[BUG] view-source with POST data. Bug?



  • Hi, When i display source of webpage(with post data, after HTTP POST request) Vivaldi makes second request () to display webpage sourcecode. But second request is without POST data, so the source code is diffrent... Is it a bug? [attachment=1872]vivalid_post_data.jpg[/attachment] [attachment=1873]vivalid_post_data_view_source.jpg[/attachment] Attachments: [img]https://forum.vivaldi.net/uploads/attachments/68828/vivalid_post_data.jpg[/img],[img]https://forum.vivaldi.net/uploads/attachments/68828/vivalid_post_data_view_source.jpg[/img]



  • Nobody know?


  • Moderator

    You can call it a really bad programming concept or a bug. 😉
    Chromium derived browsers show always the source of a GET requst.
    That is a old Chrome bug from 2008! https://code.google.com/p/chromium/issues/detail?id=523

    You should call Developer Tools from Vivaldi menu; there you can ispect the correct source sent after POST.



  • thx for reply. I know that i can use Dev tools, but it shows "parsed" code, not raw output from serwer response. For ex.: invalid html structure…


  • Moderator

    If you need teh raw result, use network tab, select filter Doc, select shown request and inspect the Response there.



  • Yes!. It's a "feature" that takes me 1 hour to figure it out.
    Such an unfriendly for developers web engine is this.


  • Moderator

    The Developer Tools in most browsers are not usable for lowlevel debuugging.
    Try Fiddler for such use.



  • @Gwen-Dragon:

    You can call it a really bad programming concept or a bug. 😉
    Chromium derived browsers show always the source of a GET requst.
    That is a old Chrome bug from 2008! https://code.google.com/p/chromium/issues/detail?id=523

    Huh. Really odd that they have it that way, since otherwise, it does rely on the cached version. (e.g. if you view source on a counter like http://www.webwasp.co.uk/tutorials/b39-hit-counter/PHPCounter.php , it isn't incremented).

    What I mean is, if Chromium always did a new HTTP request when the user asked to view source (although that itself would be weird) I could understand Chromium's developers not wanting the browser to do a duplicate POST request (since POST requests often do some action on the server). E.g., you wouldn't want someone resubmitting a forum reply when they view source. But as it uses the cached version for GET-retrieved pages, it's puzzling why they wouldn't do the same for most cases with POST. I could maybe see why the source might be already discarded from cache if it came with a header like "cache-control: private, max-age=0, no-cache", but building a specific behavior for pages retrieved via POST doesn't make much sense to me…

    Oh, perhaps it's because they didn't want to bother setting up an additional URI scheme for retrieving the source of POST pages from cache, since a URI is needed because Chromium handles source-viewing through a regular browser tab? (That is, unlike GET-retrieved pages, where each URI uniquely identifies a cached source, here they'd have to code a URI handler that makes use some internal identifier, so instead of "view-source:[cached page's URI]" they'd need some new URI scheme of "view-post-source:[cached page's URI]:[some unique ID]" or something like that.)


 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.