Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP Headers  RSS feed

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't a servlet question, but I figure the folks here will know this. I'm writing my own HTTP server (for fun, don't ask) and I'm reading the request just fine - headers, data, etc. I've done ok writing vanilla HTML responses to the socket, but now I'd like to manipulate the headers a bit. I'm having trouble getting them to take. Can anybody show an example stream of stuff I should send? I think it is:

My server starts a handler thread for each request (for now) with the socket:

and the message handler opens input & output streams:
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, this seems to work now. I guess the Location header did not work without the Allow or maybe without the 302. Or both?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!