Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11491 closed bug (duplicate)

$.post() requires a value back

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


$.post("/Foo", { id: "2" });

This will make Firefox state "no element found".

If on the server side there is:

public void Foo(int id)
    // Nothing

However, if I switch the 'void' to 'bool' and return true, then it works:

public bool Foo(int id)
    return true;

Now Firefox does not say "no element found" anymore.

It seems that jQuery requires/expects a value to be returned by the server for the POST request. However, the server already returns HTTP 200 OK which should be enough.

Change History (3)

comment:1 Changed 11 years ago by Rick Waldron

Resolution: duplicate
Status: newclosed

comment:2 Changed 11 years ago by Rick Waldron

Duplicate of #11489.

comment:3 Changed 11 years ago by anonymous

It is not possible to reproduce this with the echo service provided by jsfiddle because of limitations in jsfiddle. Namely it always returns a Content-Type header.

The bug occurs when the response does not contain a Content-Type header.

Note: See TracTickets for help on using tickets.