0

When i request method "POST" from domain abc.com to x.abc.com

HTTP/1.1 400 Bad Request
Set-Cookie: JSESSIONID=8A0617CA8A47BEE532FFBEA95FCE6BE3; Path=/ccp/; Secure
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Fri, 10 Jan 2020 07:20:10 GMT
Connection: close
Server:  

=============================================================

This is my curl request

enter image description here

enter image description here

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
  • 1
    please add the code in the question so that one can copy paste as soon as possible. – Amit Sharma Jan 10 '20 at 07:28
  • Does this answer your question? [Curl returns 400 bad request (url with spaces)](https://stackoverflow.com/questions/12342149/curl-returns-400-bad-request-url-with-spaces) – BhAvik Gajjar Jan 10 '20 at 08:05
  • 1
    why are you putting all those "access-control" headers into your request?? 1) Those are **response** headers which are intended to be used by the responding server, not the requesting client. They are meaningless in the context of a request. 2) They are all related to CORS requests anyway, and your request is not being launched from a browser, so it cannot be subjected to CORS restrictions. If you're going to add some headers to your request, make sure you actually understand why you are adding them... – ADyson Jan 10 '20 at 09:44
  • 1
    ...[cont'd]: Don't just just blindly copy something you saw elsewhere without knowing its purpose! In this particular case it's harmless, luckily, but you could easily cause problems in your code by using code you don't properly understand (e.g. accidentally introducing security holes, or data corruption, etc etc.) – ADyson Jan 10 '20 at 09:45
  • I put access-control because i have project font-end, i call api from client to server (php) so i put access-control. – Šhayne Bui Jan 14 '20 at 10:25
  • http://codepad.org/tEROJWMX Link my code. When i deploy in heroku or run in local, it work perfect. But i run in server (of company), it not working. – Šhayne Bui Jan 14 '20 at 10:35
  • https://i3international.com/phpinfo.php This is php info – Šhayne Bui Jan 14 '20 at 10:48

0 Answers0