RTC Forums
November 23, 2024, 01:02:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: 304 woes  (Read 5115 times)
Chris Fieldhouse
RTC Expired
*
Posts: 10


« on: March 08, 2018, 01:02:04 PM »

Hi Danijel


Code:
Response.Status(304,'Unchanged');
Write('304,Unchanged');

Results in :
---------------------------
Debugger Exception Notification
---------------------------
Project rtcServer1.exe raised exception class Exception with message 'Trying to send more Data out than specified in Header.'.
---------------------------
Break   Continue   Help   
---------------------------

Code:
Response.Status(304,'Unchanged');

Removes the error but now I get an hourglass in the browser and it eventually times out.  (Chrome and IE).

What is the correct way to return 304 to the browser?

Thanks

Chris
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: March 08, 2018, 01:04:45 PM »

Sender.Response.Status(304,'Unchanged');
Sender.Write();

HTTP status code 304 has no content body.
Using Write() or Write('') will send back the response header, without a content body.
Logged
Chris Fieldhouse
RTC Expired
*
Posts: 10


« Reply #2 on: March 08, 2018, 01:36:24 PM »

Brilliant, easy when you know how! Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.023 seconds with 16 queries.