Re: svn commit: r1906618 - /httpd/httpd/branches/2.2.x/docs/manual/rewrite/intro.xml
On Thu, 2023-01-12 at 16:30 +0100, Ruediger Pluem wrote: > > $ wget http://localhost/games > > /home/rbowen/devel/presentations/puzzles is a directory, correct? > If yes, you get a redirect by mod_dir > Try making puzzles a file. > > > > > It looks like it works as intended, but then for some reason, a > > separate second request is initiated, with the trailing slash > > added. I > > am not sure why that's happening. > > > > But with curl: > > > > $ curl http://localhost/games > > > > I get the desired/expected: > > Add '-L' to your curl command and the behavior will be the same as > with wget. > curl does not follow redirects by default wget does. Thanks. Brain cramp resolved. I was treating the target of the RewriteRule as a file path, when it was, in fact, an (incomplete) URL. Thanks. Clearly I've been away from the wizardry of mod_rewrite for a little too long. --Rich
Re: svn commit: r1906618 - /httpd/httpd/branches/2.2.x/docs/manual/rewrite/intro.xml
On 1/12/23 4:23 PM, rbo...@rcbowen.com wrote: > On Thu, 2023-01-12 at 09:59 -0500, rbo...@rcbowen.com wrote: >> >> I'll dig deeper on this. >> > > What I'm seeing is not making much sense to me. > > With: > > RewriteRule "^/games$" "/puzzles" > > I'm getting the following behavior: > >>> > [Thu Jan 12 10:12:26.174426 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] init rewrite > engine with requested uri /games > [Thu Jan 12 10:12:26.174523 2023] [rewrite:trace3] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] applying pattern > '^/games$' to uri '/games' > [Thu Jan 12 10:12:26.174575 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] rewrite '/games' > -> '/puzzles' > [Thu Jan 12 10:12:26.174606 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] local path > result: /puzzles > [Thu Jan 12 10:12:26.174645 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] prefixed with > document_root to /home/rbowen/devel/presentations/puzzles > [Thu Jan 12 10:12:26.174673 2023] [rewrite:trace1] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] go-ahead with > /home/rbowen/devel/presentations/puzzles [OK] > > [Thu Jan 12 10:12:26.175644 2023] [rewrite:trace2] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] init rewrite > engine with requested uri /games/ > [Thu Jan 12 10:12:26.175725 2023] [rewrite:trace3] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] applying pattern > '^/games$' to uri '/games/' > [Thu Jan 12 10:12:26.175768 2023] [rewrite:trace1] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] pass through > /games/ > << > > Line break added for clarity. That's where things get confusing. > > This is with wget, so any "browser geting smart" behavior hopefully > removed. > > $ wget http://localhost/games /home/rbowen/devel/presentations/puzzles is a directory, correct? If yes, you get a redirect by mod_dir Try making puzzles a file. > > It looks like it works as intended, but then for some reason, a > separate second request is initiated, with the trailing slash added. I > am not sure why that's happening. > > But with curl: > > $ curl http://localhost/games > > I get the desired/expected: Add '-L' to your curl command and the behavior will be the same as with wget. curl does not follow redirects by default wget does. Regards RĂ¼diger
Re: svn commit: r1906618 - /httpd/httpd/branches/2.2.x/docs/manual/rewrite/intro.xml
DirectorySlash from mod_dir. Maybe with [PT] it would redirect to /puzzles/ (if it's on disk) or skip it. On Thu, Jan 12, 2023 at 10:23 AM wrote: > > On Thu, 2023-01-12 at 09:59 -0500, rbo...@rcbowen.com wrote: > > > > I'll dig deeper on this. > > > > What I'm seeing is not making much sense to me. > > With: > > RewriteRule "^/games$" "/puzzles" > > I'm getting the following behavior: > > >> > [Thu Jan 12 10:12:26.174426 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] init rewrite > engine with requested uri /games > [Thu Jan 12 10:12:26.174523 2023] [rewrite:trace3] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] applying pattern > '^/games$' to uri '/games' > [Thu Jan 12 10:12:26.174575 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] rewrite '/games' > -> '/puzzles' > [Thu Jan 12 10:12:26.174606 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] local path > result: /puzzles > [Thu Jan 12 10:12:26.174645 2023] [rewrite:trace2] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] prefixed with > document_root to /home/rbowen/devel/presentations/puzzles > [Thu Jan 12 10:12:26.174673 2023] [rewrite:trace1] [pid 615418:tid > 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04004c30/initial] go-ahead with > /home/rbowen/devel/presentations/puzzles [OK] > > [Thu Jan 12 10:12:26.175644 2023] [rewrite:trace2] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] init rewrite > engine with requested uri /games/ > [Thu Jan 12 10:12:26.175725 2023] [rewrite:trace3] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] applying pattern > '^/games$' to uri '/games/' > [Thu Jan 12 10:12:26.175768 2023] [rewrite:trace1] [pid 615418:tid > 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - > [localhost/sid#564e6de96770][rid#7efe04002c20/initial] pass through > /games/ > << > > Line break added for clarity. That's where things get confusing. > > This is with wget, so any "browser geting smart" behavior hopefully > removed. > > $ wget http://localhost/games > > It looks like it works as intended, but then for some reason, a > separate second request is initiated, with the trailing slash added. I > am not sure why that's happening. > > But with curl: > > $ curl http://localhost/games > > I get the desired/expected: > > > [Thu Jan 12 10:17:54.208145 2023] [rewrite:trace2] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] init rewrite > engine with requested uri /games > [Thu Jan 12 10:17:54.208172 2023] [rewrite:trace3] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] applying pattern > '^/games$' to uri '/games' > [Thu Jan 12 10:17:54.208188 2023] [rewrite:trace2] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] rewrite '/games' > -> '/puzzles' > [Thu Jan 12 10:17:54.208202 2023] [rewrite:trace2] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] local path > result: /puzzles > [Thu Jan 12 10:17:54.208213 2023] [rewrite:trace2] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] prefixed with > document_root to /home/rbowen/devel/presentations/puzzles > [Thu Jan 12 10:17:54.208220 2023] [rewrite:trace1] [pid 615420:tid > 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - > [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] go-ahead with > /home/rbowen/devel/presentations/puzzles [OK] > > But the actual response returned to the cli is: > > $ curl -v http://localhost/games > * Trying 127.0.0.1:80... > * Connected to localhost (127.0.0.1) port 80 (#0) > > GET /games HTTP/1.1 > > Host: localhost > > User-Agent: curl/7.85.0 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 301 Moved Permanently > < Date: Thu, 12 Jan 2023 15:20:59 GMT > < Server: Apache/2.4.54 (Fedora Linux) > < Location: http://localhost/games/ > < Content-Length: 231 > < Content-Type: text/html; charset=iso-8859-1 > < > > > 301 Moved Permanently > > Moved Permanently > The document has moved
Re: svn commit: r1906618 - /httpd/httpd/branches/2.2.x/docs/manual/rewrite/intro.xml
On Thu, 2023-01-12 at 09:59 -0500, rbo...@rcbowen.com wrote: > > I'll dig deeper on this. > What I'm seeing is not making much sense to me. With: RewriteRule "^/games$" "/puzzles" I'm getting the following behavior: >> [Thu Jan 12 10:12:26.174426 2023] [rewrite:trace2] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] init rewrite engine with requested uri /games [Thu Jan 12 10:12:26.174523 2023] [rewrite:trace3] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] applying pattern '^/games$' to uri '/games' [Thu Jan 12 10:12:26.174575 2023] [rewrite:trace2] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] rewrite '/games' -> '/puzzles' [Thu Jan 12 10:12:26.174606 2023] [rewrite:trace2] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] local path result: /puzzles [Thu Jan 12 10:12:26.174645 2023] [rewrite:trace2] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] prefixed with document_root to /home/rbowen/devel/presentations/puzzles [Thu Jan 12 10:12:26.174673 2023] [rewrite:trace1] [pid 615418:tid 615494] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04004c30/initial] go-ahead with /home/rbowen/devel/presentations/puzzles [OK] [Thu Jan 12 10:12:26.175644 2023] [rewrite:trace2] [pid 615418:tid 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04002c20/initial] init rewrite engine with requested uri /games/ [Thu Jan 12 10:12:26.175725 2023] [rewrite:trace3] [pid 615418:tid 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04002c20/initial] applying pattern '^/games$' to uri '/games/' [Thu Jan 12 10:12:26.175768 2023] [rewrite:trace1] [pid 615418:tid 615497] mod_rewrite.c(486): [client ::1:44536] ::1 - - [localhost/sid#564e6de96770][rid#7efe04002c20/initial] pass through /games/ << Line break added for clarity. That's where things get confusing. This is with wget, so any "browser geting smart" behavior hopefully removed. $ wget http://localhost/games It looks like it works as intended, but then for some reason, a separate second request is initiated, with the trailing slash added. I am not sure why that's happening. But with curl: $ curl http://localhost/games I get the desired/expected: [Thu Jan 12 10:17:54.208145 2023] [rewrite:trace2] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] init rewrite engine with requested uri /games [Thu Jan 12 10:17:54.208172 2023] [rewrite:trace3] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] applying pattern '^/games$' to uri '/games' [Thu Jan 12 10:17:54.208188 2023] [rewrite:trace2] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] rewrite '/games' -> '/puzzles' [Thu Jan 12 10:17:54.208202 2023] [rewrite:trace2] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] local path result: /puzzles [Thu Jan 12 10:17:54.208213 2023] [rewrite:trace2] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] prefixed with document_root to /home/rbowen/devel/presentations/puzzles [Thu Jan 12 10:17:54.208220 2023] [rewrite:trace1] [pid 615420:tid 615581] mod_rewrite.c(486): [client 127.0.0.1:47176] 127.0.0.1 - - [localhost/sid#564e6de96770][rid#7efe1000cd70/initial] go-ahead with /home/rbowen/devel/presentations/puzzles [OK] But the actual response returned to the cli is: $ curl -v http://localhost/games * Trying 127.0.0.1:80... * Connected to localhost (127.0.0.1) port 80 (#0) > GET /games HTTP/1.1 > Host: localhost > User-Agent: curl/7.85.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 301 Moved Permanently < Date: Thu, 12 Jan 2023 15:20:59 GMT < Server: Apache/2.4.54 (Fedora Linux) < Location: http://localhost/games/ < Content-Length: 231 < Content-Type: text/html; charset=iso-8859-1 < 301 Moved Permanently Moved Permanently The document has moved http://localhost/games/;>here. What's going on here?
Re: svn commit: r1906618 - /httpd/httpd/branches/2.2.x/docs/manual/rewrite/intro.xml
On Wed, 2023-01-11 at 19:36 -0800, Roy T. Fielding wrote: > I am pretty sure that this change makes the example incorrect. > > That regex is not supposed to match "/foo/" (even if one might > want to do that for directory examples, this particular example > is not about directories). /foo is the whole path. > > If a directory example is desired, perhaps a new example would > be better? Perhaps. I tested the example that was in the doc previously, and it failed - but I think it was because the browser tried to get clever, and appended a "/" I'll dig deeper on this.
Re: [VOTE] Release httpd-2.4.55-rc1 as httpd-2.4.55
Not a showstopper, but: srclib/apr/configure was again generated with autoconf 2.70+ (2.71). This triggers a bug which is fixed in APR 1.7.x head, but the fix has not been released as there was not APR release vor almost 4 years now. Since the bundled APR/APU are not actually part of the release, for me this is not a show stopper. I just wanted to note the defect in case others are wondering, why the bundled APR can not be build using configure. Technical details: configure: error: could not determine the string function for int64_t It comes from defining some things once in conftest.c and again in the included confdefs.h. Some pointers: https://github.com/apache/apr/pull/25 https://github.com/apache/apr/commit/a15958a37a06f71c42c690278f9c958b93b7ee20 https://github.com/apache/apr/commit/e0197912a5438b3836ce2e76371f01e289d82931 https://www.mail-archive.com/bug-autoconf@gnu.org/msg04695.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97998 Best regards, Rainer Am 10.01.23 um 14:40 schrieb Eric Covener: Hi all, Please find below the proposed release tarball and signatures: https://dist.apache.org/repos/dist/dev/httpd/ I would like to call a VOTE over the next few days to release this candidate tarball httpd-2.4.55-rc1 as 2.4.55: [ ] +1: It's not just good, it's good enough! [ ] +0: Let's have a talk. [ ] -1: There's trouble in paradise. Here's what's wrong. The computed digests of the tarball up for vote are: sha256: 5276ea8bc6fff31eed5c82132ae51a0b2ee05f9e6b61a00fa877f6cadab3b638 *httpd-2.4.55-rc1.tar.gz sha512: ca0d03b5e74078977378fe711ca3ed8cf63c109b7dbe73f2c43f7f30f7e522bbe46f93189a183b7675394d57fffb0c2526facd8d40508be984a7a8f64d18f8d6 *httpd-2.4.55-rc1.tar.gz The SVN candidate source is found at tags/2.4.55-rc1-candidate.