Re: Retrieve final URL after redirection
- From: Dan Winship <danw gnome org>
- To: Daniel Drake <dsd laptop org>
- Cc: libsoup-list gnome org
- Subject: Re: Retrieve final URL after redirection
- Date: Sat, 07 Sep 2013 11:36:55 -0400
On 09/07/2013 10:19 AM, Daniel Drake wrote:
I tried that, and it doesn't seem to work.
session = Soup.SessionSync()
uri = Soup.URI.new("http://www.google.com")
m = Soup.Message(uri=uri)
session.send_message(m)
print m.get_uri().to_string(False)
print m.get_property('uri').to_string(False)
Output is
http://www.google.com/
http://www.google.com/
but google definitely redirects. Tested with libsoup-2.42.2
I don't get a redirect when I fetch that URI.
If I fetch "http://google.com/" with no "www", then it redirects to
"www.google.com", and the URI property on the message gets updated to
reflect that.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]