Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miranda does not recognize HTTP/1.0 headers #1

Closed
GoogleCodeExporter opened this issue Feb 18, 2016 · 1 comment
Closed

Miranda does not recognize HTTP/1.0 headers #1

GoogleCodeExporter opened this issue Feb 18, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Miranda (v1-1) does not recognize HTTP/1.0 headers returned by the device. 

Steps to reproduce:
1. upnp> msearch
2. upnp> host get 0
3. upnp> host send 0 WANConnectionDevice WANIPConnection GetExternalIPAddress
   SOAP request failed with error code: 200 OK

The expected output would have been:

    NewExternalIPAddress : 82.171.240.239

Instead, an error is returned:

   SOAP request failed with error code: 200 OK

The apparent reason for this is because Miranda checks the response for HTTP 
error code 200 to determine if the request was successful. It does this using 
the following code:

    if not header.upper().startswith('HTTP/1.1 200'):

However, my particular device returns an HTTP/1.0 response and not HTTP/1.1.

I've attached a patch to fix the problem. Apply it with:

    miranda_1-1/$ patch -p0 < miranda-http10.patch 
    patching file miranda.py


Original issue reported on code.google.com by ferry.bo...@gmail.com on 11 Dec 2011 at 10:59

Attachments:

@GoogleCodeExporter
Copy link
Author

Just checked in a fix that should support both 1.1 and 1.0 responses now. 
Thanks!

Original comment by heffne...@gmail.com on 7 Sep 2012 at 11:51

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant