From e0efafa6f883940863c88d9b29aaddb27cdc4394 Mon Sep 17 00:00:00 2001 From: "pollmann%netscape.com" Date: Sat, 25 Mar 2000 03:38:51 +0000 Subject: [PATCH] Bug 25330: Form with no action specified should truncate old query string r=harishd --- layout/html/forms/src/nsFormFrame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layout/html/forms/src/nsFormFrame.cpp b/layout/html/forms/src/nsFormFrame.cpp index 5ed7231b3fa3..717a5d3f4603 100644 --- a/layout/html/forms/src/nsFormFrame.cpp +++ b/layout/html/forms/src/nsFormFrame.cpp @@ -734,6 +734,12 @@ nsFormFrame::OnSubmit(nsIPresContext* aPresContext, nsIFrame* aFrame) if (relPath) { href.Append(relPath); nsCRT::free(relPath); + + // If re-using the same URL, chop off old query string (bug 25330) + PRInt32 queryStart = href.FindChar('?'); + if (kNotFound != queryStart) { + href.Truncate(queryStart); + } } else { result = NS_ERROR_OUT_OF_MEMORY; }