Closed Bug 14811 Opened 21 years ago Closed 21 years ago

form POSTs to base URL if action not explicitly specified

Categories

(Core :: DOM: Core & HTML, defect, P3)

Other
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dmose, Assigned: shaver)

References

()

Details

Go to the aforementioned URL, and type in some values and hit submit.
Since the action is not explicitly specified in the HTML, mozilla tries to POST
to the base URL (http://cvs-mirror.mozilla.org/webtools/despot/), which doesn't
support posting.  This seems like a beta-blocker candidate, since some existing
forms become unusable.
Status: NEW → ASSIGNED
Target Milestone: M11
I think I see how to fix this; I'm on it.
I fixed this recently, it should post to despot.cgi now.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This is the code I added to nsFormFrame::OnSubmit - interestingly, there was a
difference in the way Necko's MakeAbsoluteURI worked versus the old netlib's
MakeAbsoluteURL.  Fun stuff...


      // Necko's MakeAbsoluteURI doesn't reuse the baseURL's rel path if
it is
      // passed a zero length rel path.
      char* relPath = nsnull;
      docURL-
>GetSpec(&relPath);
      NS_ASSERTION(relPath, "Rel path couldn't be formed in form submit!\n");
      if (relPath) {
        href.Append(relPath);
        nsCRT::free(relPath);
      } else {
        result = NS_ERROR_OUT_OF_MEMORY;
      }
Status: RESOLVED → VERIFIED
Looks good; works nicely with despot now.
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.