1

For some reason the load function within the distro does not seem to work and I cannot load files I'm attempting to access through a web browser.

When I attempt to access content the web browser gives me an error stating "No data received." However, the terminal I'm running the server in gives me the "HTTP/1.1 200 OK" message. This means that the program executed without running into any errors including, most importantly, the fopen command on line 226 in the distro.

If fopen works that means I correctly defined the root and absolute-path and the command was able to access the correct file to open. If I messed up in any way I would have received error 500 on line 229 of the distro. I decided to debug the program with GDB and I noticed that when the "load" function is called (line 234 in the distro) it seemingly does nothing. GDB skips right by it when using the "next" command. When I attempt to "step" into the function nothing happens.

Is anybody else having this issue? Is there something I could be doing wrong that would cause load not to execute?

4
  • There's at least 1 other question on this. Have you found a solution? – lyflonglerner Sep 22 '15 at 21:38
  • I have not found anything. – plumsmugler Sep 23 '15 at 22:17
  • I figured out my problem. Mine was an issue with the path which was not always obvious. I was using strncpy to get the absolute path but wasn't ensuring \0 was placed at the end. This lead to unexpected results as I built out the path variable. – lyflonglerner Sep 24 '15 at 23:45
  • In order to test your suggestion I hard-coded the file path to make sure there is a null terminator. Unfortunately, this doesn't resolve the problem. I'm getting the same error in Chrome of "No data received." – plumsmugler Oct 13 '15 at 15:10

Browse other questions tagged .