Go Down

Topic: EthernetShield + Webserver on a NAS in my LAN (Read 3294 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy