Bugzilla – Attachment 177072 Details for
Bug 38929
POST endpoints not returning the Location header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38929: Add 2 exceptions
Bug-38929-Add-2-exceptions.patch (text/plain), 1.31 KB, created by
David Nind
on 2025-01-23 19:39:06 UTC
(
hide
)
Description:
Bug 38929: Add 2 exceptions
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-01-23 19:39:06 UTC
Size:
1.31 KB
patch
obsolete
>From 66a7ef2ecf2d24b767247a1531611c87d06ac964 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 22 Jan 2025 13:08:10 +0100 >Subject: [PATCH] Bug 38929: Add 2 exceptions > >Signed-off-by: David Nind <david@davidnind.com> >--- > xt/api.t | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/xt/api.t b/xt/api.t >index 47e00460db..6faebdca9e 100755 >--- a/xt/api.t >+++ b/xt/api.t >@@ -175,10 +175,17 @@ subtest '400 response tests' => sub { > subtest 'POST (201) have location header' => sub { > my @files = `git ls-files 'Koha/REST/V1/**/*.pm'`; > plan tests => scalar @files; >+ my @exceptions = qw( >+ Koha/REST/V1/Auth/Password.pm >+ Koha/REST/V1/Preservation/WaitingList.pm >+ ); > foreach my $file (@files) { > chomp $file; > my $content = read_file($file); >- if ( $content !~ /status\s*=>\s*201/s ) { >+ if ( grep { $file eq $_ } @exceptions ) { >+ pass("$file is skipped - exception"); >+ } >+ elsif ( $content !~ /status\s*=>\s*201/s ) { > pass("$file does not seem to have a POST endpoint"); > } elsif ( $content =~ /\$c->res->headers->location\(.*?\);\s*return\s+\$c->render\s*\(\s*status\s*=>\s*201,/s ) { > pass("$file contains the location header"); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38929
:
176832
|
176833
|
176834
|
176901
|
176906
|
177068
|
177069
|
177070
|
177071
|
177072
|
177106
|
177107
|
177108
|
177109
|
177110