# No HTTP version in request

**URL:** <https://www.ruby-forum.com/t/no-http-version-in-request/227576>\
**Category:** NGINX\
**Created:** [March 20, 2013, 2:48am UTC](https://www.ruby-forum.com/t/no-http-version-in-request/227576 "2013-03-20T02:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthieu\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@Matthieu\_T](https://www.ruby-forum.com/u/Matthieu_T)\
**Post date:** [March 20, 2013, 2:48am UTC](https://www.ruby-forum.com/t/no-http-version-in-request/227576/1 "2013-03-20T02:48:01Z")

</div>

I just found an interesting behavior in Nginx while looking at a reqeust  
that was causing an error in my code.

For a request with no HTTP/xx version, Nginx will return no HTTP  
response  
headers.

From what I gathered, this is just Nginx defaulting to HTTP/0.9, where  
no  
headers are expected. And actually doing the right thing here.

But shouldn’t $server\_protocol default to HTTP/0.9 in that case, instead  
of  
being an empty string ?

---

<div class="post-metadata">

**Author:** ![Matthieu\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@Matthieu\_T](https://www.ruby-forum.com/u/Matthieu_T)\
**Post date:** [March 20, 2013, 6:04am UTC](https://www.ruby-forum.com/t/no-http-version-in-request/227576/2 "2013-03-20T06:04:52Z")

</div>

On Mar 20, 2013, at 5:47 , Matthieu T. wrote:

> I just found an interesting behavior in Nginx while looking at a reqeust that  
> was causing an error in my code.
> 
> For a request with no HTTP/xx version, Nginx will return no HTTP response  
> headers.
> 
> From what I gathered, this is just Nginx defaulting to HTTP/0.9, where no  
> headers are expected. And actually doing the right thing here.
> 
> But shouldn’t $server\_protocol default to HTTP/0.9 in that case, instead of  
> being an empty string ?

Yes, absence of protocol version is so called HTTP/0.9 but this is adhoc  
name, so I think empty string  
is correct value, since there is no protocol version at all.
