请教关于用c做cgi的问题

jimyhou 2003-09-11 01:27:37
想测试几种浏览器对http协议的支持,用c写了一个cgi程序,用来打印http的status code,但是发现很多没有相应,比如201和一些3XX的code。着了一些资料,但是大都没有这方面的详细说明,请教一下大家,应该如何处理。
...全文
74 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
jimyhou 2003-09-11
  • 打赏
  • 举报
回复
我看到一篇文章说只有这些code是可以被cgi直接打印给浏览器的,不知道是不是这样。如果是的话,其他的code是由谁打印的?


Status: 200 OK The request was fulfilled.
Status: 201 OK Following a POST command.
Status: 202 OK Accepted for processing, but processing not completed.
Status: 203 OK Partial information - The returned information is only partial.
Status: 204 OK No response - Request but no information exists to send back
Status: 301 Moved - The data requested has a new location and the change is permanent.
Status: 302 Found - The data requested has a different URL temporarily
Status: 303 Method - Under discussion, a suggestion for the client to try another location.
Status: 304 Not Modified - The document has not been modified as expected.
Status: 400 Bad request - Syntax problem in th equest or it could not be satisfied.
Status: 401 Unauthorized - The client is not authorized to access data.
Status: 402 Payment requred - Indicates a charging scheme is in effect.
Status: 403 Forbidden - Access not granted even with authorization.
Status: 404 Not found - Server could not find the given resource.
Status: 500 Internal Error - The server could not fulfill the equest because of an unexpected condition.
Status: 501 Not implemented - The server does not support the facility requested.
Status: 502 Server overloaded - High load (or servicing) in progress.
Status: 503 Gateway timeout - Server waited for another service that did not complete in time.

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧