Skip to main content
Visitor II
October 6, 2021
Solved

Can't get web browser to redirect after POST using HTTP/1.1 303 See Other

  • October 6, 2021
  • 1 reply
  • 779 views

I have built an HTTP webserver on my STM32F407 custom board. I have multiple pages working. One of the pages lets the user select a file using the browser and upload it to the webserver. All of that is working. My issue is that when the upload completes I can't get the web browser to redirect to my home page. If I send it the home page it correctly displays it but the URL remains "upload.cgi". As far as I can tell from reading lots of google search results the following should work, but after the upload the browser keeps spinning the favicon. Any ideas?

HTTP/1.1 303 See Other

Location: index.html

Mike.

    This topic has been closed for replies.
    Best answer by MStra.3

    OK, I literally thought of the answer while in the shower this morning... I wasn't closing the connection after sending the 303. Now it works!

    Mike.

    1 reply

    MStra.3AuthorAnswer
    Visitor II
    October 7, 2021

    OK, I literally thought of the answer while in the shower this morning... I wasn't closing the connection after sending the 303. Now it works!

    Mike.

    Graduate II
    October 7, 2021

    "A new survey contributed to by cognitive psychologist Scott Barry Kaufman Ph.D. and commissioned by shows that 72 percent of people have experienced new ideas in the shower. In fact, 14 percent take showers for the sole purpose of generating creative thoughts and insights."

    https://www.kbbonline.com/news/business/do-the-brightest-ideas-begin-in-the-shower/