Bug 7656 - Query string always appended to Flash URLs, instead of being replaced
Summary: Query string always appended to Flash URLs, instead of being replaced
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://ifparty.scenesp.org/06/
Keywords:
: 5475 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-08 00:09 PST by sole
Modified: 2006-03-13 05:35 PST (History)
2 users (show)

See Also:


Attachments
proposed fix (2.39 KB, patch)
2006-03-08 08:18 PST, Alexey Proskuryakov
darin: review-
Details | Formatted Diff | Diff
fix with test and ChangeLog (8.22 KB, patch)
2006-03-08 11:34 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sole 2006-03-08 00:09:13 PST
When clicking on any of the options of the menu, the url gets appended a new ?section, instead of replacing the old one. Sometimes safari gets stuck in a loop and fails with a message which says "Redirection limit exceeded". It can look like this:

Safari can’t open the page.
Too many redirects occurred trying to open “http://ifparty.scenesp.org/06/?section=news?section=about?section=press?section=register?section=news?section=press?section=contact?section=compos?section=press?section=press?section=about?section=news?section=about?section=press?section=register?section=news?section=press?section=contact?section=compos?section=press?section=press?section=about&language=sp?.... (this string is longer, fills all the browser page)

This page works properly on any other browsers we have tested: firefox mac/pc, explorer... I have been looking at the code of the page and it uses lots of redirections (302), but I haven't found any reference to safari bugs with 302 redirections. Sorry if the bug is repeated...
Comment 1 Alexey Proskuryakov 2006-03-08 06:38:57 PST
I can confirm the URL issue. It has been reported before (bug 5475), but that case was unreproducible. Setting severity to normal - blocker severity is for bugs that block WebKit development.

I didn't see the "Redirection limit exceeded" problem. Please file a separate bug for it, if it is reproducible with a current nightly build from <http://nightly.webkit.org>.
Comment 2 Alexey Proskuryakov 2006-03-08 08:18:25 PST
Created attachment 6941 [details]
proposed fix

This doesn't attempt to fix any redirection problems.
Comment 3 Darin Adler 2006-03-08 09:05:20 PST
Comment on attachment 6941 [details]
proposed fix

This patch looks very good. It needs a change log and a layout test, so I'm marking it review-. I believe we can test this with a layout test.
Comment 4 Alexey Proskuryakov 2006-03-08 11:34:14 PST
Created attachment 6945 [details]
fix with test and ChangeLog

Making a layout test was harder than fixing the bug, but not as hard as I expected :)
Comment 5 Darin Adler 2006-03-08 16:29:37 PST
Comment on attachment 6945 [details]
fix with test and ChangeLog

+            NPUTF8 urlString[size];

You should use malloc here instead of using the gcc extension that allows variable sized arrays. Maybe strdup is the best way.

But that's in test code.

Looks great, r=me.
Comment 6 Alexey Proskuryakov 2006-03-08 21:55:39 PST
Aren't variable sized arrays a standard C99 feature now?

I landed as is, although I believe that having 5 lines of code just to append a trailing zero to each string parameter doesn't look good; we'll likely want to rewrite this anyway, as the number of supported methods grows.
Comment 7 Alexey Proskuryakov 2006-03-13 05:35:45 PST
*** Bug 5475 has been marked as a duplicate of this bug. ***