cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (CB-8761) WP8: FileTransfer does not inherit cookies from WebBrowser
Date Sat, 25 Apr 2015 22:07:39 GMT


ASF subversion and git services commented on CB-8761:

Commit 75d55ddaaa184f8d48b3ecaf2071fe858596359c in cordova-plugin-file-transfer's branch refs/heads/master
from [~dpolivy]
[;h=75d55dd ]

CB-8761 [wp8]: Copy cookies from WebBrowser

On other platforms, the cookies from the browser that apply to the
request are automatically included. On WP8, that's not the case.

This commit will copy the cookies from the WebBrowser control, if the
scheme and host of the WebBrowser match that of the HttpWebRequest. For
users who host their web components remotely, and perform
uploads/downloads from the same server using cookie based
authentication, this fix enables that scenario on WP8, and brings it up
to parity with iOS, Android, and others.


CB-8761 [wp8]: Cleanup per comments

github close #74

> WP8: FileTransfer does not inherit cookies from WebBrowser
> ----------------------------------------------------------
>                 Key: CB-8761
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin File Transfer
>            Reporter: Dan Polivy
> On Android and iOS (and presumably other platforms), the file transfer plugin will inherit
any relevant cookies from the WebBrowser control when communicating with a particular domain.
On WP8, however, that is not the case, as HttpWebRequest does not share cookies with the WebBrowser
> When cookies are used for authentication, and authentication is required for file uploads,
it becomes important to be able to set cookies on the HttpWebRequest containing the upload.
This should be supported on WP8 like it is on other platforms.
> I have built a solution to this problem that works; it essentially copies the relevant
cookies from the WebBrowser control and manually generates a Cookie header for the HttpWebRequest.
Due to some bugs in the version of .NET on WP8, not all cookie data is accessible in this
manner (e.g. path, domain), however enough is there to get the job done.
> This fix is more limited to only scenarios where the browser scheme and host match that
of the file transfer request to avoid any security issues with cookies going to the wrong
domain. In my scenario, I am hosting my web pages remotely, on the same server I upload files
to, so this works OK. Unfortunately, it won't help with scenarios where the transfer is to
a different remote host.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message