Opened 8 years ago

Closed 5 years ago

#7637 closed defect (worksforme)

Message "No protocol matching content type" is displayed

Reported by: anonymous Owned by: osimons
Priority: high Component: XmlRpcPlugin
Severity: major Keywords: xmlrpc, content-type, http status
Cc: Trac Release: 0.12


I get the messages:

Trac[web_ui] ERROR: No protocol matching Content-Type 'text/plain' at path '/rpc'.


"GET /<tracenv>/rpc HTTP/1.1" 415

in the log. Anybody know what causes the messages and how to prevent them from happening?

I am running standalone tracd 0.12, and TracXMLRPC-1.1.0_r8620-py2.5.egg on Windows XP with Python 2.5.

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by osimons

Resolution: worksforme
Status: newclosed

Looks correct to me. There is no protocol that responds to text/plain - whatever input and response that is supposed to generate?

As the docs say (make a request to /rpc using a web browser), the default plugin should support application/xml for XML-RPC and (if you have json or simplejson available) JSON-RPC using application/json in Content-Type header.

Please reopen if this does not explain or solve it, but if so please provide more information about the actual request you are making - what tool, details of request and so on.

comment:2 Changed 8 years ago by anonymous

Resolution: worksforme
Status: closedreopened

OK, so I need to explain myself better. After installing the XML RPC Plugin, I see the link "RPC API" in the meta-nav bar, and clicking the link produces the message I mentioned before. My intention is to use the VisualStudio Trac Explorer, which as I understand needs/uses the XML RPC plugin, however if the XML RPC itself does not work then TracExplorer isn't going to work either. I am not trying to use XML RPC as a programmer, I would like it to work with TracExplorer as a user.

I do also have simplejson-2.1.1-py2.5 installed in my lib/site-packages if that matters or helps.

Sorry about the lack of detail/clarity earlier!

comment:3 Changed 8 years ago by osimons

I'm still not convinced it is a TracRPC problem.

Somehow whatever browser you are using is sending/requesting text/plain content. The RPC plugin works by detecting content type of the request, and any web browser should handle text/html which is what makes the RPC plugin serve the documentation. Open the URL using any regular browser and you should see the docs.

Now, for RPC requests other content types should be used, and for those requests the RPC plugin will dispatch to correct protocol. The plugin works fine, and should also work fine for you with TracExplorer. Not able to view the docs is a separate issue from being able to use XML-RPC protocol.

What browser are you using when clicking "RPC API" in metanav? Is it some built-in VS browser or something?

comment:4 Changed 8 years ago by anonymous

I am using Internet Explorer 8 on Windows XP SP3. The messages reported earlier appear whether I click the metanav link when inside IE.

How can I ensure that the request is for text/html? How can the request be examined before it is sent to ascertain the request type? Can a html page be crafted to send a GET/POST request of the appropriate type - what is involved in creating such a request? Elementary questions for you I am sure, but I could use some help. Thanks for your patience.

comment:5 Changed 8 years ago by osimons

Resolution: worksforme
Status: reopenedclosed

I've now tried IE8 on XP SP3, and I cannot replicate your problem. The browser, unsurprisingly, will state its preference for html reposnses and be served the documentation like it should.

Try another browser. Try IE8 on another machine.

comment:6 Changed 5 years ago by anonymous

Resolution: worksforme
Status: closedreopened

comment:7 Changed 5 years ago by osimons

Resolution: worksforme
Status: reopenedclosed

Don't reopen a closed ticket without providing a reason and fresh insights.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain osimons.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.