[Bug 62955] New: HEAD request fail if GCI script do not return body part

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 62955] New: HEAD request fail if GCI script do not return body part

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62955

            Bug ID: 62955
           Summary: HEAD request fail if GCI script do not return body
                    part
           Product: Apache httpd-2
           Version: 2.4.37
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_http2
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

When perform http HEAD request against php CGI script, I receive PROTOCOL_ERROR
in case http/2 is used:

vlado@vladopc:~$ curl --http1.1 --head https://www.testurko.com/test/i.php
HTTP/1.1 200 OK
Date: Tue, 27 Nov 2018 11:15:13 GMT
Server: Apache
Upgrade: h2
Connection: Upgrade
Content-Type: text/html

vlado@vladopc:~$ curl --http2 --head https://www.testurko.com/test/i.php
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

Further investigation lead me to the way php respond to HEAD request: it sends
back only the header w/o the body part.
So I tried to reproduce this behavior with a simple perl script:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";

print "<html> <head>\n";
print "<title>Hello, world!</title>";
print "</head>\n";
print "<body>\n";
print "<h1>Hello, world!</h1>\n";
print "</body> </html>\n";

And both HEAD and GET requests work well via http/1.1 and http/2 until I
commented out the body part.
Then the behavior become exactly the same as above:

# GET request:
vlado@vladopc:~$ curl --http2 https://www.testurko.com/test/i.pl

# HEAD requests:
vlado@vladopc:~$ curl --http2 --head https://www.testurko.com/test/i.pl
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

vlado@vladopc:~$ curl --http1.1 --head https://www.testurko.com/test/i.pl
HTTP/1.1 200 OK
Date: Tue, 27 Nov 2018 11:23:07 GMT
Server: Apache
Upgrade: h2
Connection: Upgrade
Content-Type: text/html

Further attempts to investigate the problem lead me to Output filters: If I set
any kind of output filter, the problem disappear.
For example I tried both SetOutputFilter and AddOutputFilterByType in .htaccess
with INCLUDES and DEFLATE filters and no matter what kind of filter is applied,
the HEAD request via http/2 works.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62955] HEAD request via http/2 fail if GCI script do not return body part

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62955

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|HEAD request fail if GCI    |HEAD request via http/2
                   |script do not return body   |fail if GCI script do not
                   |part                        |return body part

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62955] HEAD request via http/2 fail if GCI script do not return body part

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62955

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62955] HEAD request via http/2 fail if GCI script do not return body part

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62955

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.37                      |2.4.34

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

Reply | Threaded
Open this post in threaded view
|

[Bug 62955] HEAD request via http/2 fail if GCI script do not return body part

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62955

--- Comment #1 from steve anders <[hidden email]> ---
perhaps this will help

<a href="https://games.lol/android/">66 unblocked games 66 at school</a>

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