Go Down

Topic: EthernetShield + Webserver on a NAS in my LAN (Read 3240 times) previous topic - next topic

pylon

Both implementations should produce the exact same output to the server. The println() method adds a carriage return AND newline to the supplied string:

Code: [Select]
size_t Print::println(void)
{
  size_t n = print('\r');
  n += print('\n');
  return n;
}


So I don't see the difference...

What version of the IDE are you using?

juekr

I use 1.0.1 but the problem (as far as I understand it) is not the request but the server handling it. It seems like println() sends data and line break in seperate packets (whatever "packet" means in this case) whereas print("SOMETHINGSOMETHING\r\n") sends everything in just one packet. Both methods should be fine but the lightttp server seems to get hickups from requests spanning over several packets.

PaulS

Quote
It seems like println() sends data and line break in seperate packets

This is indeed the case.

Quote
whereas print("SOMETHINGSOMETHING\r\n") sends everything in just one packet.

Also true.

Go Up