anonymous2ch / libproxy

Automatically exported from code.google.com/p/libproxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Query-string is inadvertedly stripped from PAC GET URL

GoogleCodeExporter opened this issue · comments

1. Set the PAC URL to something with a required query string, e.g.
     pac+http://some-MS-TMG-host.domain.tld/array.dl?Get.Resource.Script
2. Query libproxy, e.g. using: _PX_DEBUG=1 proxy http://google.com

I'd expect to see: 

  [...]
  PAC received!
  Using pacrunner: ...
  http://proxy1:8080 http://proxy2:8080 direct://

Instead I get:

  Ingored list is: 
  Config is: 
        pac+http://some-MS-TMG-host.domain.tld/array.dl?Get.Resource.Script
  Unable to download PAC!
  direct://

and the server returned a 404.

I am using 0.4.11 on Ubuntu 12.04 Precise
When I straced the proxy tool I saw that it did a:
GET /array.dll HTTP/1.1

So, it forgot to pass the ?Get.Resource.Script query string.  When I inspected
libproxy/url/url.cpp I saw that the query string is just ignored/stripped
when parsing (which makes sense for request URLs but not for PAC URLs IMO).

Original issue reported on code.google.com by p...@luon.net on 28 Nov 2013 at 12:18

I have attached a patch which introduces the member variable m_query for query 
strings in the url class.
It is no longer stripped but set in the constructor and only used in 
url::get_pac().

Original comment by p...@luon.net on 28 Nov 2013 at 12:20

Attachments: