Re: [users@httpd] Compiling 2.4.34 on linux against a non system openssl version
On Tue, Sep 18, 2018 at 8:43 AM Yann Ylavic wrote: > > Hi, > > On Mon, Sep 17, 2018 at 11:12 PM Matthew Goebel wrote: > > > > export LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib" > > export CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include" > > > > ./configure --enable-ssl --with-ssl > > Better with --with-ssl=/usr/local ? Sorry, responded too fast, should be: export LDFLAGS="-Wl,-rpath,/usr/local/ssl/lib" ./configure --enable-ssl --with-ssl=/usr/local/ssl or with a single line: ./configure LDFLAGS="-Wl,-rpath,/usr/local/ssl/lib" --enable-ssl --with-ssl=/usr/local/ssl Regards, Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Compiling 2.4.34 on linux against a non system openssl version
Hi, On Mon, Sep 17, 2018 at 11:12 PM Matthew Goebel wrote: > > export LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib" > export CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include" > > ./configure --enable-ssl --with-ssl Better with --with-ssl=/usr/local ? > make Regards, Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Compiling 2.4.34 on linux against a non system openssl version
Hello, With gcc 4.3.x and apache 2.2.x I could compile apache against a non system version of openssl. If the extra openssl is in /usr/local/ssl/lib and added to /etc/ld.so.conf I could do the following export LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib" export CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include" ./configure --enable-ssl --with-ssl make and apache would have the path for the crypt and ssl libs baked into executable as from /usr/local/ssl/lib instead of /usr/lib. With gcc 4.8.x and apache 2.4.x I cannot seem to accomplish the same thing. The -R flag was replaced with -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib, which seems to work for other software but not apache 2.4. Not matter what I've tried the httpd binary is always linked against /lib64/libcrypt.so.1 instead of /usr/local/lib64/libcrypt.so.1 Any suggestions? Yes, I'm trying to avoid having to set LD_LIBRARY_PATH before invoking httpd. Thanks, Matt -- Matthew Goebel : goe...@emunix.emich.edu : Unix Jockey @ EMU : Hail Eris Neo-Student, Net Lurker, Donut consumer, and procrastinating medher... "Always with the negative waves, Moriarty" - Oddball "Comfort the troubled, and trouble the comfortable." - Dietrich Bonhoeffer
Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy
I already figured I'd have to keep Apache running at all times. I'd like it if you guys were to read my httpd.conf and the virtual host configuration file to see if I did it correctly. I did read the documentation for it, but I'm not sure if I did correctly and the virtual host also doesn't seem to be working correctly (I tried to navigate to the site after starting Apache httpd as a service, but it didn't work; how do I correctly navigate to a proxied app on Apache?). Thanks in advance. From: Frank Gingras Sent: Sunday, September 9, 2018 8:17:34 AM To: users@httpd.apache.org Subject: Re: [users@httpd] Want to Deploy Web App Behind a Reverse Proxy See http://httpd.apache.org/docs/2.4/howto/reverse_proxy.html and http://www.apachetutor.org/admin/reverseproxies. You do need to have a httpd instance running at all times; how else do you think it will serve requests? Lastly, your comment about the documentation is a bit odd - perhaps you could offer constructive comments on specific sections instead, so that we could work on improving it. A lot of folks dedicated a lot of time writing it, and even more would benefit from improvements. On Thu, Sep 6, 2018 at 7:42 PM Osman Zakir mailto:osmanzaki...@hotmail.com>> wrote: I have a web application I want to deploy behind a reverse proxy. Do I have to do this on my own computer with the instance of the Apache HTTP Server that I've installed on my machine, or is it possible to do this on the Apache somehow as well? If possible, I'd like to do the latter because I'd prefer not having to always keep my computer on. The reason I want a reverse proxy is because my application has its own httpd( written in C++). I'd like the application to be publicly available on the Internet. If I set up a virtual host with Apache (with a public IP, one that isn't 127.0.0.1, and one I can navigate to from anywhere), will that make the application publicly available as I intend? I'll also need help on setting up virtual hosts and a reverse proxy since the Apache documentation is too technical for me (I did try reading it). httpd.conf Description: httpd.conf httpd-vhosts.conf Description: httpd-vhosts.conf - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Re: Non Blocking write in apache
If it will flush data then at what condition it will go to apr_poll function ?? What I understand is that if buffer is filled with 52KB data and writev is not ready then it should go into apr_poll(). Now the problem may exist with 42KB also. I hope I am explained my issue. Thanks Hemant On Sep 17, 2018 6:58 PM, "Yann Ylavic" wrote: > Hi, > > On Mon, Sep 17, 2018 at 1:51 PM Hemant Chaudhary > wrote: > > > > in the apache error_log with trace6, it is trying to flush because it > reached thresold_max_buffer. But at the same time, it is adding data in > buffer which increases it size to to more than 52KB and fails on NonStop. > > Yes, THRESHOLD_MAX_BUFFER is the limit *above* which the buffer is > flushed, but not the maximum number of bytes flushed... > > > How should I stop apache so that it should go to select function till > 52KB success. > > The simpler would be to take a 10K margin, like defining > THRESHOLD_MAX_BUFFER to 42K. > Otherwise, you need a patch like the one attached (untested)... > > Regards, > Yann. > > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org >
[users@httpd] mod_macro, unix domain sockets, php-fpm pool config files
mod_macro and unix domain socket functionality in Apache are nice features, thanks to whomever put in the time and effort developing/maintaining. We have looked for an equivalent of Apache mod_macro for php-fpm in order avoid having to create a php-fpm pool conf for each Apache virtual host using unix domain sockets. No luck thus far. Does anyone have techniques they use for generating large number of php-fpm pool config's utilized by Apache virtual hosts using unix domain sockets within mod_macro, instead of creating them one by one by hand? Thanks
Re: [users@httpd] Re: Non Blocking write in apache
On Mon, Sep 17, 2018 at 3:27 PM Yann Ylavic wrote: > > Otherwise, you need a patch like the one attached (untested)... Sorry, it did not compile, so here is v2. With this patch, you could compile httpd with "-D MAX_BYTES_TO_WRITEV=52000" for instance. Index: server/core_filters.c === --- server/core_filters.c (revision 1840698) +++ server/core_filters.c (working copy) @@ -348,6 +348,7 @@ static apr_status_t send_brigade_blocking(apr_sock static apr_status_t writev_nonblocking(apr_socket_t *s, struct iovec *vec, apr_size_t nvec, apr_bucket_brigade *bb, + apr_size_t bytes_to_write, apr_size_t *cumulative_bytes_written, conn_rec *c); @@ -645,6 +646,9 @@ static void setaside_remaining_output(ap_filter_t #define MAX_IOVEC_TO_WRITE APR_MAX_IOVEC_SIZE #endif #endif +#ifndef MAX_BYTES_TO_WRITEV +#define MAX_BYTES_TO_WRITEV 0 +#endif static apr_status_t send_brigade_nonblocking(apr_socket_t *s, apr_bucket_brigade *bb, @@ -654,7 +658,7 @@ static apr_status_t send_brigade_nonblocking(apr_s apr_bucket *bucket, *next; apr_status_t rv; struct iovec vec[MAX_IOVEC_TO_WRITE]; -apr_size_t nvec = 0; +apr_size_t nvec = 0, nbytes = 0; remove_empty_buckets(bb); @@ -676,11 +680,12 @@ static apr_status_t send_brigade_nonblocking(apr_s (bucket->length >= AP_MIN_SENDFILE_BYTES)) { if (nvec > 0) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1); -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0); return rv; } +nbytes = 0; } rv = sendfile_nonblocking(s, bucket, bytes_written, c); if (nvec > 0) { @@ -705,10 +710,11 @@ static apr_status_t send_brigade_nonblocking(apr_s if (APR_STATUS_IS_EAGAIN(rv)) { /* Read would block; flush any pending data and retry. */ if (nvec) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv) { return rv; } +nbytes = 0; nvec = 0; } @@ -717,25 +723,42 @@ static apr_status_t send_brigade_nonblocking(apr_s if (rv != APR_SUCCESS) { return rv; } +if (!length) { +/* read may have split the bucket, so recompute next: */ +next = APR_BUCKET_NEXT(bucket); +continue; +} -/* reading may have split the bucket, so recompute next: */ +nbytes += length; +#if MAX_BYTES_TO_WRITEV +if (nbytes > MAX_BYTES_TO_WRITEV) { +length -= nbytes - MAX_BYTES_TO_WRITEV; +rv = apr_bucket_split(bucket, length); +if (rv != APR_SUCCESS) { +return rv; +} +nbytes = MAX_BYTES_TO_WRITEV; +} +#endif + +/* above may have split the bucket, so recompute next: */ next = APR_BUCKET_NEXT(bucket); vec[nvec].iov_base = (char *)data; vec[nvec].iov_len = length; nvec++; -if (nvec == MAX_IOVEC_TO_WRITE) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); -nvec = 0; +if (nvec == MAX_IOVEC_TO_WRITE || nbytes == MAX_BYTES_TO_WRITEV) { +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { return rv; } -break; +nbytes = 0; +nvec = 0; } } } if (nvec > 0) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { return rv; } @@ -795,11 +818,12 @@ static apr_status_t send_brigade_blocking(apr_sock static apr_status_t writev_nonblocking(apr_socket_t *s, struct iovec *vec, apr_size_t nvec, apr_bucket_brigade *bb, + apr_size_t bytes_to_write,
Re: [users@httpd] Re: Non Blocking write in apache
Hi, On Mon, Sep 17, 2018 at 1:51 PM Hemant Chaudhary wrote: > > in the apache error_log with trace6, it is trying to flush because it reached > thresold_max_buffer. But at the same time, it is adding data in buffer which > increases it size to to more than 52KB and fails on NonStop. Yes, THRESHOLD_MAX_BUFFER is the limit *above* which the buffer is flushed, but not the maximum number of bytes flushed... > How should I stop apache so that it should go to select function till 52KB > success. The simpler would be to take a 10K margin, like defining THRESHOLD_MAX_BUFFER to 42K. Otherwise, you need a patch like the one attached (untested)... Regards, Yann. Index: server/core_filters.c === --- server/core_filters.c (revision 1840698) +++ server/core_filters.c (working copy) @@ -348,6 +348,7 @@ static apr_status_t send_brigade_blocking(apr_sock static apr_status_t writev_nonblocking(apr_socket_t *s, struct iovec *vec, apr_size_t nvec, apr_bucket_brigade *bb, + apr_size_t bytes_to_write, apr_size_t *cumulative_bytes_written, conn_rec *c); @@ -645,6 +646,9 @@ static void setaside_remaining_output(ap_filter_t #define MAX_IOVEC_TO_WRITE APR_MAX_IOVEC_SIZE #endif #endif +#ifndef MAX_BYTES_TO_WRITEV +#define MAX_BYTES_TO_WRITEV 0 +#endif static apr_status_t send_brigade_nonblocking(apr_socket_t *s, apr_bucket_brigade *bb, @@ -654,7 +658,7 @@ static apr_status_t send_brigade_nonblocking(apr_s apr_bucket *bucket, *next; apr_status_t rv; struct iovec vec[MAX_IOVEC_TO_WRITE]; -apr_size_t nvec = 0; +apr_size_t nvec = 0, nbytes = 0; remove_empty_buckets(bb); @@ -676,11 +680,12 @@ static apr_status_t send_brigade_nonblocking(apr_s (bucket->length >= AP_MIN_SENDFILE_BYTES)) { if (nvec > 0) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1); -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0); return rv; } +nbytes = 0; } rv = sendfile_nonblocking(s, bucket, bytes_written, c); if (nvec > 0) { @@ -705,10 +710,11 @@ static apr_status_t send_brigade_nonblocking(apr_s if (APR_STATUS_IS_EAGAIN(rv)) { /* Read would block; flush any pending data and retry. */ if (nvec) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv) { return rv; } +nbytes = 0; nvec = 0; } @@ -717,25 +723,40 @@ static apr_status_t send_brigade_nonblocking(apr_s if (rv != APR_SUCCESS) { return rv; } +if (!length) { +continue; +} -/* reading may have split the bucket, so recompute next: */ +nbytes += length; +#if MAX_BYTES_TO_WRITEV +if (nbytes > MAX_BYTES_TO_WRITEV) { +length -= nbytes - MAX_BYTES_TO_WRITE; +rv = apr_bucket_split(bucket, length); +if (rv != APR_SUCCESS) { +return rv; +} +nbytes = MAX_BYTES_TO_WRITEV; +} +#endif + +/* above may have split the bucket, so recompute next: */ next = APR_BUCKET_NEXT(bucket); vec[nvec].iov_base = (char *)data; vec[nvec].iov_len = length; nvec++; -if (nvec == MAX_IOVEC_TO_WRITE) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); -nvec = 0; +if (nvec == MAX_IOVEC_TO_WRITE || nbytes == MAX_BYTES_TO_WRITEV) { +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { return rv; } -break; +nbytes = 0; +nvec = 0; } } } if (nvec > 0) { -rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); +rv = writev_nonblocking(s, vec, nvec, bb, nbytes, bytes_written, c); if (rv != APR_SUCCESS) { return rv; } @@ -795,11 +816,12 @@ static apr_status_t send_brigade_blocking(apr_sock
Re: [users@httpd] Re: Non Blocking write in apache
Hi, in the apache error_log with trace6, it is trying to flush because it reached thresold_max_buffer. But at the same time, it is adding data in buffer which increases it size to to more than 52KB and fails on NonStop. How should I stop apache so that it should go to select function till 52KB success. Attaching error_log with new change. Thanks Hemant On Mon, Sep 17, 2018 at 4:01 PM Hemant Chaudhary < hemantdude.chaudh...@gmail.com> wrote: > Hi Yann, > > Thanks for your explanation. I got the issue. > Actually NonStop has maximum limit of 52KB only for writev. Therefore I > was getting 4022 after 49KB. Because after 49KB, apache is adding 8K more > bytes which leads to 56KB. Therefore, writev was failing. > > To solve this, I have changed THRESHOLD_MAX_BUFFER in core_filter.c to > 5. But again I am seeing that after 49KB, apache is adding 8192 Bytes > in it, which leads to failure of writev again. > > Do I need to change in more places or the above fix should work. > Thanks > Hemant > > On Sun, Sep 16, 2018 at 4:48 PM Yann Ylavic wrote: > >> Hi Hermant, >> >> On Fri, Sep 14, 2018 at 1:53 PM Hemant Chaudhary >> wrote: >> > >> > Please don't get confuse with Cygwin(Windows). I am running apache on >> NonStop(Tandem). >> >> Well, isn't the error_log attached to the previous message relevant >> (be it cygwin or not)? >> Btw, LogLevel trace6 would help here. >> >> > I have put breakpoint at apr_poll() but it is not going there. >> > >> > Few Events of writing : >> > 1) apache writes 779 bytes to tomcat from apr_socket_sendv() function >> and writev functions returns success. >> > 2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function >> but writev function returns -1 with EWOULDBLOCK and it has >> timeout=0(because set in writev_nonblocking()) >> > 3) apache again tries to write 32796 to tomcat from apr_socket_sendv() >> function but writev function returns -1 with EWOULDBLOCK and it has >> timeout=0(because set in writev_nonblocking()). >> > 4) apache again tries to write 40988 to tomcat from apr_socket_sendv() >> function but writev function returns -1 with EWOULDBLOCK and it has >> timeout=0(because set in writev_nonblocking()). >> > 5) apache again tries to write 49180 to tomcat from apr_socket_sendv() >> function but writev function returns -1 with EWOULDBLOCK and it has >> timeout=0(because set in writev_nonblocking()). >> >> OK, all those EWOULDBLOCK make the core output filter to bufferize the >> "pending" data for the next time it's called. >> >> > 6) After this I am getting 4022 error. >> >> Here the 64K bufferized limit/threshold is reached >> (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER in >> ap_core_output_filter()), so the core output filter can't continue >> nonblocking anymore and enters send_brigade_blocking(), which does >> send_brigade_nonblocking() + apr_poll() until the 64K buffer is sent >> completely. >> >> However it seems that on your system the first call to >> send_brigade_nonblocking() fails (since apr_poll() is never called), >> possibly a limit on apr_socket_sendv() (i.e. writev() syscall), either >> more than 64K total bytes or nvec > 4? >> >> I think you need to debug/gdb in send_brigade_nonblocking() for this >> last call and determine where and why send_brigade_nonblocking() => >> writev_nonblocking() => apr_socket_send() => writev(vec, nvec) fails. >> Maybe a unit test (a simple standalone main() program) can determine >> the limits for writev() on your system, so that the right values for >> THRESHOLD_MAX_BUFFER and MAX_IOVEC_TO_WRITE (in >> "server/core_filters.c") can be tuned for NonStop(Tandem) ... >> >> Hope that helps, >> Yann. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >> For additional commands, e-mail: users-h...@httpd.apache.org >> >> [Mon Sep 17 11:41:16.226341 2018] [core:trace5] [pid 1107296306:tid 577217628620783620] C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\server\protocol.c(645): [client 15.213.82.149:54687] Request received from client: POST /FileUploadServletExample/uploadFile HTTP/1.1 [Mon Sep 17 11:41:16.226712 2018] [http:trace4] [pid 1107296306:tid 577217628620783620] C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(420): [client 15.213.82.149:54687] Headers received from client:, referer: http://15.213.91.33:5010/FileUploadServletExample/ [Mon Sep 17 11:41:16.226806 2018] [http:trace4] [pid 1107296306:tid 577217628620783620] C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424): [client 15.213.82.149:54687] Host: 15.213.91.33:5010, referer: http://15.213.91.33:5010/FileUploadServletExample/ [Mon Sep 17 11:41:16.226820 2018] [http:trace4] [pid 1107296306:tid 577217628620783620] C:\cygwin64\home\apache29\apache-2.4.29\httpd-2.4.29\modules\http\http_request.c(424): [client 15.213.82.149:54687] Connection: keep-alive, referer: http://
Re: [users@httpd] Re: Non Blocking write in apache
Hi Yann, Thanks for your explanation. I got the issue. Actually NonStop has maximum limit of 52KB only for writev. Therefore I was getting 4022 after 49KB. Because after 49KB, apache is adding 8K more bytes which leads to 56KB. Therefore, writev was failing. To solve this, I have changed THRESHOLD_MAX_BUFFER in core_filter.c to 5. But again I am seeing that after 49KB, apache is adding 8192 Bytes in it, which leads to failure of writev again. Do I need to change in more places or the above fix should work. Thanks Hemant On Sun, Sep 16, 2018 at 4:48 PM Yann Ylavic wrote: > Hi Hermant, > > On Fri, Sep 14, 2018 at 1:53 PM Hemant Chaudhary > wrote: > > > > Please don't get confuse with Cygwin(Windows). I am running apache on > NonStop(Tandem). > > Well, isn't the error_log attached to the previous message relevant > (be it cygwin or not)? > Btw, LogLevel trace6 would help here. > > > I have put breakpoint at apr_poll() but it is not going there. > > > > Few Events of writing : > > 1) apache writes 779 bytes to tomcat from apr_socket_sendv() function > and writev functions returns success. > > 2) apache writes 24604 bytes to tomcat from apr_socket_sendv() function > but writev function returns -1 with EWOULDBLOCK and it has > timeout=0(because set in writev_nonblocking()) > > 3) apache again tries to write 32796 to tomcat from apr_socket_sendv() > function but writev function returns -1 with EWOULDBLOCK and it has > timeout=0(because set in writev_nonblocking()). > > 4) apache again tries to write 40988 to tomcat from apr_socket_sendv() > function but writev function returns -1 with EWOULDBLOCK and it has > timeout=0(because set in writev_nonblocking()). > > 5) apache again tries to write 49180 to tomcat from apr_socket_sendv() > function but writev function returns -1 with EWOULDBLOCK and it has > timeout=0(because set in writev_nonblocking()). > > OK, all those EWOULDBLOCK make the core output filter to bufferize the > "pending" data for the next time it's called. > > > 6) After this I am getting 4022 error. > > Here the 64K bufferized limit/threshold is reached > (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER in > ap_core_output_filter()), so the core output filter can't continue > nonblocking anymore and enters send_brigade_blocking(), which does > send_brigade_nonblocking() + apr_poll() until the 64K buffer is sent > completely. > > However it seems that on your system the first call to > send_brigade_nonblocking() fails (since apr_poll() is never called), > possibly a limit on apr_socket_sendv() (i.e. writev() syscall), either > more than 64K total bytes or nvec > 4? > > I think you need to debug/gdb in send_brigade_nonblocking() for this > last call and determine where and why send_brigade_nonblocking() => > writev_nonblocking() => apr_socket_send() => writev(vec, nvec) fails. > Maybe a unit test (a simple standalone main() program) can determine > the limits for writev() on your system, so that the right values for > THRESHOLD_MAX_BUFFER and MAX_IOVEC_TO_WRITE (in > "server/core_filters.c") can be tuned for NonStop(Tandem) ... > > Hope that helps, > Yann. > > - > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >
Re: [users@httpd] mod_substitute not firing with HTTP Status Code 201?
> On 17 Sep 2018, at 10:09, Maarten Boekhold wrote: > > Hi, > > Careful reading of the mod_filter documentation pointed me to the issue: > mod_filter by default only filters documents with Status Code 200. You need > to "SetEnv filter-errordocs" to make it work with other status codes... Thanks for doing your own homework: I was just investigating that question when your second mail came through. I take it you checked and filter-errordocs fixed it for you? The specific point that concerns me is not that we don't (by default) filter error documents: that's entirely deliberate, and I could've answered that question without having to investigate anything. But 201 isn't an error, and it's probably wrong to treat it as such in filtering. This needs thinking through and perhaps fixing. -- Nick Kew - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] mod_substitute not firing with HTTP Status Code 201?
Hi, Careful reading of the mod_filter documentation pointed me to the issue: mod_filter by default only filters documents with Status Code 200. You need to "SetEnv filter-errordocs" to make it work with other status codes... Maarten On 09/17/2018 12:14 PM, Maarten Boekhold wrote: Hi, I have a Substitute statement defined for a specific Location as: FilterChain SUBST ProxyPass stuff Substitute s|fromText|toText|n A specific request that is handled by this Location returns with HTTP Status Code 201. The substitution does **not** take place. Another request handled by the same Location returns with 200, and the substitution is executed correctly. Is there anything in mod_substitute (or mod_filter?) that is dependent on the HTTP Status Code? I tried having a look at the source code, but didn't immediately spot anything related to this. I found one similar question on SO about this, where a user had the same issue with 403 responses, and substitution not working, so I am slightly inclined to believe there is something happening here. Maarten - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] mod_substitute not firing with HTTP Status Code 201?
Hi, I have a Substitute statement defined for a specific Location as: FilterChain SUBST ProxyPass stuff Substitute s|fromText|toText|n A specific request that is handled by this Location returns with HTTP Status Code 201. The substitution does **not** take place. Another request handled by the same Location returns with 200, and the substitution is executed correctly. Is there anything in mod_substitute (or mod_filter?) that is dependent on the HTTP Status Code? I tried having a look at the source code, but didn't immediately spot anything related to this. I found one similar question on SO about this, where a user had the same issue with 403 responses, and substitution not working, so I am slightly inclined to believe there is something happening here. Maarten - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org