Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do basic authentication with Prowser using e-mail address-based usernames?

I am using Prowser to screen scrape internal corporate websites. Some of the sites use basic authentication where the username is:

[email protected]

According to the documentation, in order to user digest or basic auth, I need to open the URL like this:

https://username:[email protected]/

But when I actually construct the URL, it looks like this:

https://[email protected]:[email protected]/

Which results in a URI parse error. I haven't been able to find any other way to do this using Prowser. Is there a way to set these values manually in, eg. the Request object? Or another way to encode the values?

like image 355
Christopher Avatar asked Aug 22 '09 11:08

Christopher


1 Answers

You are supposed to URI encode the username and password values, so "@" encodes to "%40".

like image 172
Guss Avatar answered Oct 17 '22 15:10

Guss