Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

If-Modified-Since

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure out how to get the server to return a 304 NOT MODIFIED response code in reply to this request from the client:
connection.setRequestProperty("If-Modified-Since","Sat, 29 Oct 2004 19:43:31 GMT");
Do I have the syntax correct? (The date format is pretty nasty)
Thanks,
Drew
 
Steve Leach
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't you just use response.setStatus(304) ?
 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I figured out the problem.
The date I was using to test with was after the servers system time, so it was invalid. Go figure.
Sorry if this was a bit OT.
Drew
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic