oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 120 forks source link

allow xhr from the the application /Library path in addition to www d… #45

Closed vguddant closed 4 years ago

vguddant commented 4 years ago

A mobile application can download content to the application data directory and may want to serve content from this directory in addition to content from the application package. This needs xhr access to the device data directory (/Library) in addition to the application package (/www).

The purpose of the pull request is to add support for xhr content served from application data directory.

We could potentially add a setting to the plugin to allow this new behavior. But I see no reason to add an additional config parameter.

manish2788 commented 4 years ago

Hi Venkata, I am unable to figure out exact lines of code changed, entire file is showing as green. Can you please take a look if there is any issue with spacing or indentation which is causing this issue.

manish2788 commented 4 years ago

Hi Venkata,

Github change log still now showing up the specific line of change in your commit. Your last two commits shows the latest changes in repository which were missing in your last commit.

However I manually compared your modifed file with one in master, I can see following block of code being modified

return [targetPath hasPrefix:basePath] ||
           [targetPath hasPrefix:[[NSURL fileURLWithPath:
                                   [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]]  absoluteString]];

Changes looks fine but my concern is that your changes in first commit is highlighting entire file in green rather it should highlight only the changes you have done.

vguddant commented 4 years ago

Hi Manish,

This seems to be somekind of issue with the github repo itself. I use a diff tool(Araxis merge) to compare master against this branch and only the 2 lines show up as changes. There are no other whitespace changes either.

thanks, Venlata

Manish Kumar wrote on 10/21/19 3:49 AM:

Hi Venkata,

Github change log still now showing up the specific line of change in your commit. Your last two commits shows the latest changes in repository which were missing in your last commit.

However I manually compared your modifed file with one in master, I can see following block of code being modified

|return [targetPath hasPrefix:basePath] || [targetPath hasPrefix:[[NSURL fileURLWithPath: [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]] absoluteString]]; |

Changes looks fine but my concern is that your changes in first commit is highlighting entire file in green rather it should highlight only the changes you have done.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_oracle_cordova-2Dplugin-2Dwkwebview-2Dfile-2Dxhr_pull_45-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DANLL4HZIRYFS34IUSE77ZHDQPV3MDA5CNFSM4I77HZM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZXVJI-23issuecomment-2D544438949&d=DwMCaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=RENbdUlqMUGQhfPWCJzmAFICXrxFV1FXcSSYSJQMiD0&m=dAGmA2sPO-3XYSB6I4zrf5-1LhDzKxllHeNlGgKS6Bw&s=_2zlobe0m92GRNPcKyd0xM4HC3dhjuGYgaMEkCGlLnE&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ANLL4H7QYLJHTHB7KOV54T3QPV3MDANCNFSM4I77HZMQ&d=DwMCaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=RENbdUlqMUGQhfPWCJzmAFICXrxFV1FXcSSYSJQMiD0&m=dAGmA2sPO-3XYSB6I4zrf5-1LhDzKxllHeNlGgKS6Bw&s=Kxq4NBG3xmJY2lDsi9l0hsykOfJDB7OSJUInc6aUNBc&e=.