PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Error 400 - Bad Request  (Read 118 times)

cwellis67

  • New Member
  • *
  • Posts: 1
    • View Profile
Error 400 - Bad Request
« on: July 20, 2021, 04:35:46 PM »
I am getting an error 400 (Requested URL is not properly formed) returned from the Webserver when an external program is sending a POST message to it. Is there a way to see the actual and full request the Webserver is getting? I'm totally guessing that the improperly formed URL is actually part of the body of the message, but I'm not sure of that. When I use Postman to send the request, the Webserver handles it fine, but when this external program (Infor OS) is trying to send a POST it fails. It succeeds on regular GET commands, though, and I'm trying to figure out what is failing.   

Here is what is in the request.log:
<Request>
POST /ims/v2/multipartMessage HTTP/1.1
host: usalvwfacts2k16
x-forwarded-for: 52.3.40.242
x-forwarded-proto: https
x-forwarded-port: 443
x-amzn-trace-id: Root=1-60f5e322-2762508921d698154b7ac999
content-type: text/plain
authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkluZm9yQWNjZXNzVG9rZW5TaWduaW5nQ2VydGlmaWNhdGUtMTU2NjgwNDQzOSJ9.eyJzY29wZSI6IiIsImNsaWVudF9pZCI6IkZBQ1RTREVWX0RFVn4tUVUzcW9JM09aR1NKYldrN3pYTmd3VWxsUlF5dmx4LUpfQS1CNkFqMjFRIiwiaXNzIjoiaHR0cHM6Ly9xYWMtc3NvLnFhYy5hd3NkZXYuaW5mb3IuY29tIiwiYXVkIjoiaHR0cHM6Ly9xYWMtaW9uYXBpLnFhYy5hd3NkZXYuaW5mb3IuY29tIiwianRpIjoiQm4xdjdKdG9TOHh4UjZ2M083dXlQUHB1NU5KUTZ5czd1MDJBIiwiU2VydmljZUFjY291bnQiOiJGQUNUU0RFVl9ERVYjMFdMZUN2ckVHTHd2TzV3NERobUxvLUNwb2NiSXlVN3hRZGQzZjNpQzUtTFR3SXFCMGY0MUZqb2lGTmdIcjVTenZSemJJM29hbndoeDRQN1QwMEV4LVEiLCJJZGVudGl0eTIiOiJlMmE0OTUyZi0yYWQ3LTQ5OGItYWU4NS0xZDBlMGFlNWM1MDQiLCJUZW5hbnQiOiJGQUNUU0RFVl9ERVYiLCJFbmZvcmNlU2NvcGVzRm9yQ2xpZW50IjoiMCIsImV4cCI6MTYyNjczMDY2M30.NmjpfDpU8ieWlNcVmPldb6Rdv6FGSf_DRSZCfV1OLvr_owUW1kqSWrOCfHMkmtX2EyIYfMT8vdPhhI2ynFQPzL2cJn8cpOKbuYGd9S4L-5xKNZTMSXnCYvW9nMJ-8BzvwPMlox-5HPPSwwylbr99VXSOCWTl7yMXhA1L6rjb6tqkB3ejkyWvrZIfkTn9y5H8-2PIs8OBe6-UEp_eOtXrH2M0G0qxC7nshsi1GhXkeu5EfXSVj_TBlUfpxu7g8UIdikoN4I2TGJiRNqSDTlQMQ4rFrhVnR2_sbgEmV7hu2mQnFCYjfOwsWHuP0eY1r_y_SrAKTG_PHdG5aERrJBSQcQ
accept: application/json
x-tenantid: FACTSDEV_DEV
user-agent: Apache-HttpClient/4.5.12 (Java/1.8.0_282)
accept-encoding: gzip,deflate
x-request-id: 0496213e-29e8-97d4-b439-adbaea0682d2
x-b3-traceid: 0f5eaf078eb01f24
x-b3-spanid: 0f5eaf078eb01f24
x-b3-sampled: 1
Content-Length: 0
Connection: Keep-Alive


<Response>
HTTP/1.0 400 Bad Request
Allow: GET, POST, HEAD
Server: PxPlus-WebServer/1.3.18
Date: Mon, 19 Jul 2021 20:40:02 GMT
Content-Length: 256
Content-Type: text/html
Connection: close

<html>
   <head>
      <title>400 Bad Request</title>
   </head>
   <body>
      <h1>400 Bad Request</h1>
      <hr>
      <p>The Requested URL is not properly formed.<br>
Method: POST  URI:/ims/v2/multipartMessage  ARGS:</p>
   </body>
</html>

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3496
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Error 400 - Bad Request
« Reply #1 on: July 20, 2021, 04:50:48 PM »
Have you compared the requests that work vs those that don't?

Perhaps a difference in the header options?