You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2021/02/22 14:34:46 UTC

[Bug 65155] New: ab: support HTTP/1.1

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

            Bug ID: 65155
           Summary: ab: support HTTP/1.1
           Product: Apache httpd-2
           Version: 2.4-HEAD
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: support
          Assignee: bugs@httpd.apache.org
          Reporter: andrei@tehnica.org
  Target Milestone: ---

Apache Benchmark (ab) currently supports making requests only using HTTP/1.0 (
https://github.com/apache/httpd/blob/trunk/support/ab.c#L1886 )

Some proxies/sidecars used in Kubernetes (e.g. Envoy when installed by Istio)
support only HTTP/1.1 (or 2) by default. It would be nice if there was a flag
to enable HTTP/1.1 requests in ab.

Is this something that would be acceptable for ab or is it completely out of
scope?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 65155] ab: support HTTP/1.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65155

--- Comment #4 from Joe Orton <jo...@redhat.com> ---
If it's going to advertise HTTP/1.1 support, ab also needs to support HTTP/1.1
message syntax, e.g. chunked transfer-coding, which it doesn't currently, so
surely this isn't as simple as changing the request-line.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 65155] ab: support HTTP/1.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65155

--- Comment #3 from Yann Ylavic <yl...@gmail.com> ---
(In reply to Andrei from comment #2)
> Which solution is
> preferred?
> 
> * move definitions and initialization at the top of the file
> * define at top, initialize just before apr_snprintf 
> * inline again the initialization as arguments to the apr_snprintf function

Move the const definitions with initializations at the top of the test()
function?
It seems that the initializations depend on globals only so there's no previous
initialization in in the test() function itself which prevents that, unless I'm
missing something..

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 65155] ab: support HTTP/1.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65155

--- Comment #5 from Andrei <an...@tehnica.org> ---
(In reply to Yann Ylavic from comment #3)
> Move the const definitions with initializations at the top of the test()
> function?

Yes, at the top of the function, not the method.

(In reply to Joe Orton from comment #4)
> If it's going to advertise HTTP/1.1 support, ab also needs to support
> HTTP/1.1 message syntax, e.g. chunked transfer-coding, which it doesn't
> currently, so surely this isn't as simple as changing the request-line.

Yes, you're right. I was just thinking of my (simple) use case... :|

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 65155] ab: support HTTP/1.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65155

--- Comment #1 from Yann Ylavic <yl...@gmail.com> ---
(In reply to Andrei from comment #0)
> Is this something that would be acceptable for ab or is it completely out of
> scope?

Sure, there could be for instance a command line "-1" option to control this.
Would you propose a patch?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 65155] ab: support HTTP/1.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65155

--- Comment #2 from Andrei <an...@tehnica.org> ---
I've just tried now to create a PR ( https://github.com/apache/httpd/pull/173 )
but the change fails because C89/C90 style is (still) being used (e.g.
https://travis-ci.com/github/apache/httpd/jobs/486139913 )

ab.c:1874:5: error: ISO C90 forbids mixed declarations and code
[-Werror=declaration-after-statement]
     const char *const http_version = http_spec == HTTP_1_1 ? "HTTP/1.1" :
"HTTP/1.0";
     ^~~~~


I would have preferred to use a const pointer, but that would mean to move all
three initializations to the top of the function. Which solution is preferred?

* move definitions and initialization at the top of the file
* define at top, initialize just before apr_snprintf 
* inline again the initialization as arguments to the apr_snprintf function (I
don't find this easily readable)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org