4

I have configured slic3r's OctoPrint Upload section with the with hostname ("octopi") and port (80) of my OctoPrint server. The Test button indicates a successful connection.

But when I use "Send to Printer" I get an HTTP error 302.

How can I fix this? Error 302

Mark Harrison
  • 1,043
  • 1
  • 11
  • 22

1 Answers1

3

Specific answer: use "octopi.local" rather than "octopi", since that will properly resolve to the correct Octopi IP Address.


More generally, investigating the network traffic on my network (AT&T Fiber Home) revealed these facts regarding the octopi server:

  • With a browser, the octopi can be accessed via either "octopi:80" or "octopi.local:80".
  • However, "octopi" actually talks to the network router, which sends a "302" message with the target name "octopi.local".
  • So, for the browser it seems either name is correct, but in actuality only "octopi.local" is the correct network name for the octopi system.

And these facts regarding the slic3r configuration:

  • slic3r does not process "302" messages, instead treating them as errors. This is OK, since a properly configured network won't be generating these.
  • the slic3r connection test is incomplete. It reports success because it receives an HTTP response, even though the response is a 302 rather than the version information that it is requesting.

So in this particular case, entering "octopi.local" instead of "octopi" corrected the error. If you receive a 302 error, you will need to research and verify the exact IP address or host name for the target Octopi system.

A future version of slic3r should probably report an error on the "test" button if it doesn't (a) get a proper 200 return code and (b) return the proper version information as slic3r is requesting.

Mark Harrison
  • 1,043
  • 1
  • 11
  • 22
  • 1
    most software checks for 2xx series response codes as a valid ones - that it is the reason for giving the error popup :) - btw very good explanation, I will also add an option to use IP address, but that depends on internal DHCP settings – profesor79 Jun 25 '18 at 09:19
  • 1
    @profesor79, I agree. I updated the answer to clarify that the 302 error is proper behavior, and that the test function was what was confusing me. – Mark Harrison Jun 28 '18 at 05:11