Posted by arcade 3 years 21 weeks ago
Hello. I need help from professionals ;)
I'm facing a really strange problem on Nokia 6070 phones using HEADER("Location: ...") within a biiling API. While it works fine on every other device, exactly here it does not perform the redirect, giving me an 405 - BAD REQUEST!?
The billing interface receives and returns XML data submitted by the POST Method. I am using cURL in php for that reason.
I send the first identificacion to the billing interface and after having received the SUCCESS, the device needs to be redirectet to a given URL on the billing server.
So far it looks like this
if($this->identify()) {
// Identify was successful - we received the redirect-url in our result
session_write_close(); // close session file
HEADER("Location: ".$trans->redirect_url);
exit();
} else {
// Identify faild
return false;
}
The result from a cURL operation returned SUCCESS and the $trans-redirect_url is set. On Nokia6070 it stops printing Error 405 ...
I know what HTTP ERROR 405 means, but I do not understand why it only occurs on this device. Now I'm stuck. I'm not sure wether it has something to do with the Configuration of our Apache Webserver or something specific in this device.
The redirect URL suports the POST method.. Is it possible that the device submits in GET by default? IF so, is it possible to add Headers before doing the redirect itself? Has anyone experiencd similar Problems?
I woul appreciate any hint that helps going further ....
Regards




Posted by arcade 3 years ago
IN my first post I was confused to write 405 Bad Request... 405 means METHOD NOT ALLOWED...
OK,
I read that some older devices like Nokia, Samsung, etc... cannot perform a redirect after having submitted a Post form... So I tried some kind of workarround, adding another header - page moved or page found - before the header location redirect... (s. example above)
...
HEADER("HTTP/1.1 302 FOUND");
HEADER("Location: ".$trans->redirect_url);
..
Same error 405 keeps bothering me....
Posted by arcade 3 years ago
I found out that some older devices do not allow two following post submissions. I guess that this is not a problem of the devices OS (Nokia 6070 is based on Symbian) but the browser. The workarround posting a 302 or 301 header in between did not work.
Possible solutions can be :
- Use GET method if a form requieres a header redirect after its submission
- Let the client call the redirect itself echoing an "a href" link with the redirect URL
- Do a META refresh for the redirect on a new page.
Posted by xiaopy12 3 days ago
Louis Vuitton Sale dfhrdj