Bug 16500

Summary: [GTK] comments link = page not found
Product: WebKit Reporter: Tomas Rimkus <sandshrew>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alp, sandshrew
Priority: P2 Keywords: Curl, Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
URL: http://rq.lt/2007/12/05/nusipiesiam/#comments
Attachments:
Description Flags
Don't send the URL fragment part to the server none

Description Tomas Rimkus 2007-12-18 07:32:54 PST
Clicking on the link for displaying comments results in a "page not found" error message. Web page generated with wordpress 2.3 . Both opera and firefox handles the link correctly.
Tested on webkit-gtk r28814 from svn repo.
Here is a screenshot, where I have marked the link for displaying comments:
http://img57.imageshack.us/img57/9153/rqfc1.png
Comment 1 David Kilzer (:ddkilzer) 2007-12-18 09:26:53 PST
Looks okay with a local debug build of WebKit r28828 with Safari 3.0.4 (523.12) on Mac OS X 10.4.11 (8S165).

Comment 2 Alp Toker 2007-12-20 13:24:39 PST
This is a bug in the curl http backend. It includes # and everything after # in the HTTP request.
Comment 3 Alp Toker 2008-01-19 05:35:10 PST
Created attachment 18541 [details]
Don't send the URL fragment part to the server

This fixes the known issues.

+    url = url.left(url.find('#'));

Hopefully someone who knows their HTTP can review this patch.

Is my fix robust ie. will the first '#' encountered always denote a URI fragment? Is there a better way to get the URL without the fragment using the KURL class rather than doing a string search?
Comment 4 Alp Toker 2008-01-19 10:37:40 PST
Fix using kurl.setRef("") landed in r29673.
Comment 5 Alp Toker 2008-01-19 10:37:59 PST
Comment on attachment 18541 [details]
Don't send the URL fragment part to the server

Landed.