Skip to content

Response should use the same HTTP version as the request #54

@fracek

Description

@fracek

At the moment if the request is version 1.0, we reply with HTTP version 1.1. e.g. curl --http1.0 -v localhost:8000/json (from techempower-benchmarks) returns

* About to connect() to localhost port 8000 (#0)
*   Trying ::1...
* Adding handle: conn: 0x1da8d10
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1da8d10) send_pipe: 1, recv_pipe: 0
* Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /json HTTP/1.0
> User-Agent: curl/7.30.0
> Host: localhost:8000
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Length: 27
< Date: Wed, 14 May 2014 09:32:49 +0200
* Server HTTP Server/0.9 is not blacklisted
< Server: HTTP Server/0.9
< Content-Type: application/json
< 
* Connection #0 to host localhost left intact
{"message":"Hello, World!"}

At the moment send-response-line uses the constant $http-version as the http version to use. I think this should be changed to be based on the http version of the request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions