https://bz.apache.org/bugzilla/show_bug.cgi?id=69916

            Bug ID: 69916
           Summary: SCGI Responses Treat Body as Header
           Product: Apache httpd-2
           Version: 2.4.66
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_scgi
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

It appears that Apache does not properly process the responses proxied to an
SCGI server.

Here's the line in my httpd.conf to enable the SCGI requests:

<Location /some-folder/>
  ProxyPass "scgi://localhost:4000/"
</Location>

Now, it does send SCGI requests properly (null-separated headers within a
netstring); but every response ends up with an extended wait (hitting some sort
of timeout) then responds with a 500 error and an error log message saying:

[date] [proxy_scgi:error] [pid 4856:tid 1360] [client 127.0.0.1:60707]
malformed header from script 'test.html': Bad header: abcdefg
[date] [proxy_scgi:error] [pid 4856:tid 1360] [client 127.0.0.1:60707] AH00860:
error reading response headers from localhost:4000

For some reason, it's thinking the content of the response (abcdefg) is a
header, hence the error.

If I perform a direct request with curl, bypassing Apache, via "curl -iv
localhost:4000", I get the following:

* Host localhost:4000 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:4000...
*   Trying 127.0.0.1:4000...
* Established connection to localhost (127.0.0.1 port 4000) from 127.0.0.1 port
54471
* using HTTP/1.x
> GET / HTTP/1.1
> Host: localhost:4000
> User-Agent: curl/8.16.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Cache-Control: max-age=259200
Cache-Control: max-age=259200
< Content-Type: text/plain
Content-Type: text/plain
* no chunk, no close, no size. Assume close to signal end
<

abcdefg* shutting down connection #0

So the SCGI server itself is responding properly (if you're wondering, I
adjusted the server to send a fixed response for HTTP requests and for SCGI,
for testing).

As for my OS, I'm actually running Windows 11, but the highest version I could
select was 10.

Any ideas what is causing this problem?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to