A Simple Http Server with Java/Socket?

后端 未结 5 1227
耶瑟儿~
耶瑟儿~ 2020-11-29 03:11

I am currently creating a small HTTP server that returns a static page

Hello!

... I tried with sockets with Java:

  public sta         


        
5条回答
  •  心在旅途
    2020-11-29 03:28

    You need the correct line separators (\r\n) between each line output. It is not enough to just concatenate them - which you can see if you print the response out.

提交回复
热议问题