Opened 13 years ago
Last modified 5 years ago
#8558 closed defect
The server committed a protocol violation. Section=ResponseStatusLine — at Version 1
Reported by: | Owned by: | Noah Kantrowitz | |
---|---|---|---|
Priority: | normal | Component: | HttpAuthPlugin |
Severity: | normal | Keywords: | XmlRpc authentication content-length |
Cc: | Olemis Lang | Trac Release: | 0.12 |
Description (last modified by )
I have install XmlRpcPlugin and HttpAuthPlugin, I am not sure, where exactly is the error. when I connect by my .NET client to the XmlRpc, I get this exception from request.GetResponse() (.NET method)
I debugged it by fiddler HTTP debugger and I have found, that trac send wrong Content-Length (23bytes). It sends text "Authentication required" which is exactly 23bytes. But there is small HTML block appended, which cause, that content length is wrong. I can reproduce it with python 2.5 and python 2.7 as well. I have attached the output of fiddler, please see bellow. I find interesting, that the request is made via HTTP 1.1, but in repsonse HTTP 0.9 is mentioned.
POST http://10.250.10.55/mew/login/xmlrpc HTTP/1.1 Content-Type: text/xml User-Agent: XML-RPC.NET Host: 10.250.10.55 Cookie: trac_session=2a1a01b9d7d8bcb3db9afc27 Content-Length: 229 <?xml version="1.0"?> <methodCall> <methodName>system.methodHelp</methodName> <params> <param> <value> <string>ticket.getRecentChanges</string> </value> </param> </params> </methodCall>
HTTP/1.1 401 Unauthorized Server: tracd/0.12.2 Python/2.7 Date: Wed, 02 Mar 2011 14:07:38 GMT WWW-Authenticate: Basic realm="Control Panel" Content-Type: text/plain Pragma: no-cache Cache-control: no-cache Expires: Fri, 01 Jan 1999 00:00:00 GMT Content-Length: 23 Authentication required<head> <title>Error response</title> </head> <body> <h1>Error response</h1> <p>Error code 400. <p>Message: Bad HTTP/0.9 request type ('<?xml'). <p>Error code explanation: 400 = Bad request syntax or unsupported method. </body>
Change History (1)
comment:1 Changed 13 years ago by
Component: | XmlRpcPlugin → HttpAuthPlugin |
---|---|
Description: | modified (diff) |
Owner: | changed from osimons to Noah Kantrowitz |
XmlRpcPlugin is not involved in authentication at all, so moving it to that other plugin.
Hint: Use
{{{ .... }}}
blocks when pasting pre-formatted text.