[konqueror-kde4-http][trivial] user agent not sent in headers when switching to webkit

Bug #198273 reported by SneakyWho_am_i
4
Affects Status Importance Assigned to Milestone
webkitkde (Ubuntu)
Fix Released
Wishlist
Harald Sitter

Bug Description

Binary package hint: konqueror-kde4

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"
====================================
konqueror-kde4:
  Installed: 4:4.0.1-0ubuntu2
  Candidate: 4:4.0.1-0ubuntu2
  Version table:
 *** 4:4.0.1-0ubuntu2 0
        500 http://nz.archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status
====================================

Problem:
when switching to "Webkit View Mode", no user agent is sent (however it is sent on subsequent requests, I believe)... This is bad because some rare people will switch rendering engines to escape weird bugs - and if the site kicks them out when they do it, they're probably not going to like Konqueror very much ;)

TO REPRODUCE:
1: host the following php script:
<?php
if (!isset($_SERVER['HTTP_USER_AGENT']))
echo 'your browser is too cool to see this page';
else
echo
'welcome to my great page';
?>
2: Start Konqueror (kde4)
3: Visit the script you uploaded earlier
expected AND actual result thus far: script returns "welcome to my great page"
4: From the "view" menu, select "view mode" and confirm that it says the default "Webkit"
5: Select from that (sub) menu "KHTML"
expected AND actual result thus far: script returns "welcome to my great page"
6: From the "view" menu, select "view mode" and confirm that it says the default "KHTML"
7: Select from that (sub) menu "Webkit"
expected result: as above, "welcome to my great page"
actual result: "your browser is too cool" - no user agent was specified in the header

8+: refreshing the page, or changing back to khtml, will both produce the intended result. Apparently it is only not sent at the very moment you switch to webkit.

you can confirm with phpinfo(), wireshark, whatever.
I tested against Apache 1.3.3.7 and php5, and I couldn't get the user agent string from php in these conditions.

It shouldn't normally be a problem but remember some bad websites will boot you for using an unrecognized browser - using server-side detects - and my bank is one of those sites.

Thanks in advance guys, I know it's a little thing, sorry I can't patch it myself, I hope it's valid and I'm not wasting your time.

Revision history for this message
SneakyWho_am_i (sneakywho-am-i) wrote :

if you're not familiar with php, to avoid confusion, a good list of headers is produced when you visit a file containing
<?php
phpinfo();
?>

and they're all labelled.

What my test-case script does from my report is operate on a condition. If a certain array key has been set, it welcomes you, and if not complains about the coolness level.

We're checking for the http user agent. This array key/variable will be set IFF the user agent has sent the proper user agent information in the header.

You guys probably already can read short scripts like that ;) but I'd rather be safe than sorry, you know?

Revision history for this message
Harald Sitter (apachelogger) wrote :

Currently Konqueror crashes when installing webkitkde, I will try to reproduce this as soon as we made it work again.

Changed in kdebase-kde4:
assignee: nobody → apachelogger
importance: Undecided → Wishlist
Revision history for this message
SneakyWho_am_i (sneakywho-am-i) wrote :

Cool. If it helps what version of that I'm running (sorry):

~$ apt-cache policy webkitkde
webkitkde:
  Installed: 0~svn750780-0ubuntu1
  Candidate: 0~svn750780-0ubuntu1
  Version table:
 *** 0~svn750780-0ubuntu1 0
        500 http://nz.archive.ubuntu.com hardy/universe Packages
        100 /var/lib/dpkg/status

Revision history for this message
Niels Abspoel (aboe) wrote :

could webkitkde and webkit updated to the new svn version that works with the acid3 test??

it would be nice to have a acid3 compliant browser in hardy
 on
see r31356 http://webkit.org/blog/173/webkit-achieves-acid3-100100-in-public-build/

Revision history for this message
Harald Sitter (apachelogger) wrote :

Works in the new version included in Intrepid (8.10)

Changed in kdebase-kde4:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.