You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/22 04:53:44 UTC

[GitHub] [cordova-plugin-inappbrowser] pptrexvn opened a new issue #614: [Android] beforeload event for POST method is not fired

pptrexvn opened a new issue #614: [Android] beforeload event for POST method is not fired
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/614
 
 
   # Bug Report
   beforeload event for POST method is not fired
   ## Problem
   I read this https://github.com/apache/cordova-plugin-inappbrowser/pull/367
   And try to build an app with https://github.com/dpa99c/cordova-plugin-inappbrowser-test
   Then open inappbrowser with beforeload = YES option.
   Click on `GET link`, beforeload, loadstart and loadstop events are fired
   Click on `Submit`, only loadstart and loadstop events are fired
   
   ### What is expected to happen?
   `beforeload` event should be fired with Submit form (POST method)
   
   ### What does actually happen?
   Click on `Submit`, only loadstart and loadstop are fired
   
   
   ## Information
   Android: 7.1
   Cordova ver 9
   source code and package.json get from https://github.com/dpa99c/cordova-plugin-inappbrowser-test
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   
   ![Screenshot_20200122-114451](https://user-images.githubusercontent.com/56103021/72866353-9280b880-3d0d-11ea-98ef-e4319e55feb7.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] wvengen commented on issue #614: [Android] beforeload event for POST method is not fired

Posted by GitBox <gi...@apache.org>.
wvengen commented on issue #614: [Android] beforeload event for POST method is not fired
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/614#issuecomment-591523793
 
 
   As far as I can see in the code, there were preparations to get `POST` supported, but it is not yet handled. The change you mention paves the way a bit, and makes sure that `POST` doesn't break too much (before it would not consider the request method).
   
   >  if beforeload=yes is specified and a POST request is detected as the HTTP request method, beforeload behaviour will not be applied
   
   That is visible in [the current code](https://github.com/apache/cordova-plugin-inappbrowser/blob/7b42f3e1052ca0e0d225407dcb226562b47f6260/src/android/InAppBrowser.java#L1217).
   
   The README currently mentions:
   
   > Note that POST requests are not currently supported and will be ignored (if you set beforeload=post it will raise an error).
   
   This could be improved to read something like:
   
   > Note that POST requests are not currently supported and will be ignored (if you set beforeload=post it will raise an error, if you set beforeload=yes it will only handle GET requests).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] wvengen edited a comment on issue #614: [Android] beforeload event for POST method is not fired

Posted by GitBox <gi...@apache.org>.
wvengen edited a comment on issue #614: [Android] beforeload event for POST method is not fired
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/614#issuecomment-591523793
 
 
   As far as I can see in the code, there were preparations to get `POST` supported, but it is not yet handled. The PR you mention paves the way a bit, and makes sure that `POST` doesn't break too much (before it would not consider the request method).
   
   >  if beforeload=yes is specified and a POST request is detected as the HTTP request method, beforeload behaviour will not be applied
   
   That is visible in [the current code](https://github.com/apache/cordova-plugin-inappbrowser/blob/7b42f3e1052ca0e0d225407dcb226562b47f6260/src/android/InAppBrowser.java#L1217).
   
   The README currently mentions:
   
   > Note that POST requests are not currently supported and will be ignored (if you set beforeload=post it will raise an error).
   
   This could be improved to read something like:
   
   > Note that POST requests are not currently supported and will be ignored (if you set beforeload=post it will raise an error, if you set beforeload=yes it will only handle GET requests).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org