Im trying to submit a request and it is correctly handled in Chrome. Everything works correctly and I can keep moving through the workflow. The problem comes in when I try to send the request using Firefox or Safari. The request is simply not getting through correctly. Im trying to find where the error could occur, but I cant seem to figure out what would cause such a different behavior.
Im sending the request via a RequestBuilder and its pretty much the same code that I have been using throughout the entire project for all forms. My web browsers are the following and Im on OS X 10.6.5:
Chrome 9.0.587.0 dev
Safari 5.0.2
Firefox 3.6.12
Ive also tried on Windows 7 in Firefox. Has anyone ever run into a problem like this and if you have, have you found a fix? Thank you!
Edit:
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, "/deployments/" + createdProjectName + "/");
builder.setHeader("Content-type", "application/x-www-form-urlencoded");
try {
Request request = builder.sendRequest(formBuilder.toString(), new RequestCallback() {
public void onError(Request request, Throwable exception) {
//I handle an error here
}
public void onResponseReceived(Request request, Response response) {
if( response.getText().contains("Back to") ){
//Successful handling here
} else {
//Handling more errors here
}});
} catch (RequestException e) {
}
Figured out the problem!
The backend was refusing to handle the request because GWT decided to tack on a charset for the header data and we were not checking for that charset, we were just checking the content type. A one line fix to the backend solved all our problems.