• Hi All

    I’ve been trying to track down a problem with HTTP errors when uploading media. 2 of the 5 sites on my server have this problem .

    Using a HTTP sniffer I found the 2 calls, one goes ok, the other gets a 400 error. I wonder if any of you smart folk can spot a problem?

    ————–
    “REQUEST”: “https://domain1.com/wp-admin/media-new.php”,

    “details”: “POST /wp-admin/media-new.php HTTP/1.1”,
    “post_data”: “——WebKitFormBoundary7jXjpPhRHXeDEAa4%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22async-upload%22%3B%20filename%3D%22snowflake-554635_1280.jpg%22%0D%0AContent-Type%3A%20image%2Fjpeg%0D%0A%0D%0A%0D%0A——WebKitFormBoundary7jXjpPhRHXeDEAa4%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22html-upload%22%0D%0A%0D%0AUpload%0D%0A——WebKitFormBoundary7jXjpPhRHXeDEAa4%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22post_id%22%0D%0A%0D%0A0%0D%0A——WebKitFormBoundary7jXjpPhRHXeDEAa4%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22_wpnonce%22%0D%0A%0D%0A37e51cf99d%0D%0A——WebKitFormBoundary7jXjpPhRHXeDEAa4%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22_wp_http_referer%22%0D%0A%0D%0A%2Fwp-admin%2Fmedia-new.php%0D%0A——WebKitFormBoundary7jXjpPhRHXeDEAa4–%0D%0A”,

    “RESPONSE”: “302 Moved Temporarily, text/html”,

    “details”: “GET /wp-admin/upload.php HTTP/1.1”,

    “RESPONSE”: “200 OK, text/html”,

    ————–

    “REQUEST”: “https://domain2.com/wp-admin/media-new.php”,

    “details”: “POST /wp-admin/media-new.php HTTP/1.1”,
    “post_data”: “——WebKitFormBoundaryS9wATaWIIx9bcHQB%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22async-upload%22%3B%20filename%3D%22snowflake-554635_1280.jpg%22%0D%0AContent-Type%3A%20image%2Fjpeg%0D%0A%0D%0A%0D%0A——WebKitFormBoundaryS9wATaWIIx9bcHQB%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22html-upload%22%0D%0A%0D%0AUpload%0D%0A——WebKitFormBoundaryS9wATaWIIx9bcHQB%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22post_id%22%0D%0A%0D%0A0%0D%0A——WebKitFormBoundaryS9wATaWIIx9bcHQB%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22_wpnonce%22%0D%0A%0D%0A76064bf901%0D%0A——WebKitFormBoundaryS9wATaWIIx9bcHQB%0D%0AContent-Disposition%3A%20form-data%3B%20name%3D%22_wp_http_referer%22%0D%0A%0D%0A%2Fwp-admin%2Fmedia-new.php%0D%0A——WebKitFormBoundaryS9wATaWIIx9bcHQB–%0D%0A”,

    “RESPONSE”: “400 Bad Request, text/html”,

    ————–

    So far…
    1. I do not think there is a server wide setting as some site work fine.
    2. If I copy the offending sites onto a fresh server they also work OK – so I don’t believe it is a plug in or site problem

    So I’m thinking its a local setting. but specific to the individual website

    Thanks in Advance!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried other computers and/or browsers?

    Have you tried clearing your cookies for the site and your browser cache?

    Thread Starter MrModo

    (@mrmodo)

    Hi

    After many many hours looking at this – it turns out to be caused by Google Pagespeed. After removing one of the offending sites from pagespeed I was able to upload images > 100KB with no problem, although I am yet to find out if its possible to fix this with the site being within pagespeed

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘400 Bad Request – Loading image via browser media upload’ is closed to new replies.