Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10820 closed bug (fixed)

W+ can't download file, goes to login.php instead

Reported by: ttcoder Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Applications/WebPositive Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #10787, #10818, #11094
Platform: All

Description (last modified by pulkomandy)

1.3.1 in 47209

Downloads work fine in public sites... But when there is a (cookie based) login wall, file download fails to work in both cases I tested: webmail.free.fr and keepandshare.com (that latter one allows free sign up I think).

For instance say I'm reading my webmail, and one email has an attachement, which I click : instead of getting the file, webpositive instead downloads a login.php file (of MIME type application/xhtml+xml if that matters). It seems the authentication cookie is not propagated in that case. Other use-cases work (e.g. clicking on the "next page" in webmail works, I'm not redirected to the login page).

Change History (11)

comment:1 by beos_zealot, 10 years ago

I have encountered this issue in private torrent tracker sites - instead of "*.torrent" file webpositive downloads "login.php".

comment:2 by ttcoder, 10 years ago

Still there in hrev47259.

#10725 seems to have similar symptoms, maybe this ticket is even a dupe of that one.

in reply to:  2 comment:3 by beos_zealot, 10 years ago

Replying to ttcoder:

Still there in hrev47259.

#10725 seems to have similar symptoms, maybe this ticket is even a dupe of that one.

Tried in two private torrent tracker sites after #10725 fix, but no luck - still downloads "login.php". Tested on Haiku OS x86_64 hrev47380 with HaikuWebKit-1.4.0.

comment:4 by ttcoder, 10 years ago

Still there in hrev47537 / 1.4.0

comment:5 by pulkomandy, 10 years ago

Description: modified (diff)

Ok, I tested this with keepandshare.com (the free account lasts 15 days, I hope this will be enough). Here is my interpretation of the problem:

  • We start the request as if we were about to load a new page, but then decide it's going to be a download instead.
  • FrameLoaderClientHaiku::convertMainResourceToDownload is called with the existing request (properly configured with all the needed data)
  • This ultimately calls WebDownloadPrivate constructor with said request as an argument.
  • WebDownloadPrivate creates a new ResourceHandle from that request.

At some point in this, or perhaps a bit later, the cookies for the request get lost. So the "good" initial request ends up not being used (only the headers are parsed), and the request we attempt to use for downloading lacks the cookies, which obviously makes it redirect to the login page.

comment:6 by pulkomandy, 10 years ago

Resolution: fixed
Status: newclosed

comment:7 by pulkomandy, 10 years ago

Blocking: 10818 added

(In #10818) Seems this was a variant of #10820. In any case, it works now.

comment:8 by pulkomandy, 10 years ago

Blocking: 10787 added

(In #10787) Duplicate of #10820.

comment:9 by pulkomandy, 10 years ago

Blocking: 11094 added

comment:10 by beos_zealot, 10 years ago

Still can't download .torrent files... Haiku x86_64 hrev47697 / 1.4.1-3

comment:11 by ttcoder, 10 years ago

Got 47753 this afternoon, works great now with today's haikuWebKit thanks

Note: See TracTickets for help on using tickets.