Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: dev

Issue 733 in cherokee: options request returns 411 length required

 

 

Cherokee dev RSS feed   Index | Next | Previous | View Threaded


codesite-noreply at google

Feb 8, 2010, 12:30 PM

Post #1 of 7 (860 views)
Permalink
Issue 733 in cherokee: options request returns 411 length required

Status: New
Owner: ----

New issue 733 by eibolsoe: options request returns 411 length required
http://code.google.com/p/cherokee/issues/detail?id=733

What steps will reproduce the problem?
1. install cherokee 0.99.42
2. make it serve static files from a directory
3. send a plain OPTIONS request to a known file, without Content-Length: 0

What is the expected output? What do you see instead?

Expected:

as below (response from a request with added Content-Length: 0). Usually
without the body, as that is uncommon in OPTIONS responses. (But not
forbidden.)

HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=15
Date: Mon, 08 Feb 2010 20:19:53 GMT
Server: Cherokee/0.99.42 (UNIX)
Allow: GET, HEAD, POST, OPTIONS
ETag: 4a1eb95f=2e
Last-Modified: Thu, 28 May 2009 16:18:39 GMT
Content-Type: text/html
Content-Length: 46

<HTML>
<BODY>
<H1>Blarg!</H1>
</BODY>
</HTML>

Instead:

knan [at] viconi:~$ telnet localhost 8136
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
OPTIONS /index.html HTTP/1.1
Host: localhost

HTTP/1.1 411 Length Required
Connection: close
Date: Mon, 08 Feb 2010 20:16:08 GMT
Server: Cherokee/0.99.42 (UNIX)
Allow: GET, HEAD, POST, OPTIONS
Content-Length: 296
Content-Type: text/html
Cache-Control: no-cache
Pragma: no-cache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>411 Length Required</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>411 Length Required</h1>

<p><hr>
Cherokee web server 0.99.42 (UNIX), Port 8136
</body>
</html>
Connection closed by foreign host.

What version of the product are you using? On what operating system?

Cherokee 0.99.42, Ubuntu 9.10 i386

Please provide any additional information below.

Cherokee 0.99.42 responds 411 Length required to a plain OPTIONS request
with no Content-Length header. Body isn't defined in options requests, so
specifying Content-Length: 0 doesn't make much sense. No other web server
I've tested requires this, so I'm betting it is an unintentional bug.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Mar 5, 2010, 12:27 PM

Post #2 of 7 (784 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Comment #1 on issue 733 by Maste...@MasterCJ.net: options request returns
411 length required
http://code.google.com/p/cherokee/issues/detail?id=733

This also stops Cherokee from being able to act as a proxy to Apache for
Subversion
over HTTP. Not sure whether this is a big issue to the developers or not,
but I'd
sure like to use Cherokee without Varnish sitting in front of it, which is
what I've
had to do just to get around this one bug.

... +1 Me too! (sorry, red rag to a bull)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Mar 6, 2010, 2:04 PM

Post #3 of 7 (792 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Comment #2 on issue 733 by zdevel: options request returns 411 length
required
http://code.google.com/p/cherokee/issues/detail?id=733

Can confirm bug with svn.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 12, 2010, 9:45 PM

Post #4 of 7 (687 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Updates:
Status: Started
Owner: alobbs
Labels: Type-Enhancement Priority-Medium OpSys-All Component-Logic
Usability

Comment #3 on issue 733 by ste...@konink.de: options request returns 411
length required
http://code.google.com/p/cherokee/issues/detail?id=733

@Alvaro; Do we check for this?
"If the OPTIONS request includes an entity-body (as indicated by the
presence of
Content-Length or Transfer-Encoding), then the media type MUST be indicated
by a
Content-Type field."

I think the following could fix it, but I wonder if this is the proper fix.


Index: post.c
===================================================================
--- post.c (revision 5084)
+++ post.c (working copy)
@@ -132,9 +132,8 @@
/* Check "Content-Length"
*/
ret = cherokee_header_get_known (&conn->header,
header_content_length, &info,
&info_len);
- if (unlikely (ret != ret_ok)) {
- conn->error_code = http_length_required;
- return ret_error;
+ if (ret != ret_ok) {
+ return ret_eof;
}

/* Parse the POST length


_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 12, 2010, 9:49 PM

Post #5 of 7 (687 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Comment #4 on issue 733 by ste...@konink.de: options request returns 411
length required
http://code.google.com/p/cherokee/issues/detail?id=733

If we do a ret_ok, we get the complete request, but including the
cute 'Allow:' I
wonder if that should be the case instead.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Dec 22, 2010, 5:13 PM

Post #6 of 7 (451 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Updates:
Status: WaitingQA

Comment #5 on issue 733 by skarcha: options request returns 411 length
required
http://code.google.com/p/cherokee/issues/detail?id=733

Some work was done a few days ago related to OPTIONS request. Cherokee
1.0.14 shipped them[1].

=======================
$ telnet localhost 8008
Trying ::1...
Connected to theone.
Escape character is '^]'.
OPTIONS /index.html HTTP/1.1
Host: localhost

HTTP/1.1 200 OK
Connection: close
Date: Thu, 23 Dec 2010 01:00:26 GMT
Server: Cherokee/1.0
Content-Length: 0
Allow: GET, HEAD, OPTIONS

Connection closed by foreign host.
=======================

Could you guys give it a try?

[1]
http://lists.octality.com/pipermail/cherokee-announce/2010-December/000046.html

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 18, 2011, 10:22 AM

Post #7 of 7 (304 views)
Permalink
Re: Issue 733 in cherokee: options request returns 411 length required [In reply to]

Updates:
Status: Fixed

Comment #6 on issue 733 by alobbs: options request returns 411 length
required
http://code.google.com/p/cherokee/issues/detail?id=733

(No comment was entered for this change.)

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev

Cherokee dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.