Javaweb Study Summary (iv)--HTTP Protocol I. What is the HTTP protocolHTTP is shorthand for the Hypertext Transfer Protocol (Hypertext Transfer Protocol), an application-layer protocol to the TCP/IP protocol that defines the process of exchanging
First, what is the HTTP protocolHTTP is shorthand for the Hypertext Transfer Protocol (Hypertext Transfer Protocol), an application-layer protocol to the TCP/IP protocol that defines the process of exchanging data between a Web browser and a Web
Go to http://www.cnblogs.com/xdp-gacl/p/3751277.html first, what is the HTTP protocolHTTP is shorthand for the Hypertext Transfer Protocol (Hypertext Transfer Protocol), an application-layer protocol to the TCP/IP protocol that defines the process
Java Web Summary (IV), Java Web Summary
Use Servlet to send Server Response Information
The Servlet API defines a special interface class javax. servlet. http. HttpServletResponse to create an HTTP response, including the HTTP status line, response
First, what is the HTTP protocolHTTP is shorthand for the Hypertext Transfer Protocol (Hypertext Transfer Protocol), an application-layer protocol to the TCP/IP protocol that defines the process of exchanging data between a Web browser and a Web
Java web Learning Summary (4), java web Learning Summary1. What is HTTP?
HTTP is short for hypertext transfer protocol (hypertext transfer protocol). It is an application layer protocol of TCP/IP protocol, used to define the process of data exchange
Request part of HTTPBasic structure
Request Line get/test/hello.html http/1.1 header (not every request) empty line content (content name = Content body)
Common message Headers (detailed HTTP request message headers)
accept:text/html,image/* (Tell
HTTP---Response information case one: Implement request redirection (equivalent to hyperlink jump page)
Implementation jumps from the current page to the "/day08_web/testparam.html" page
Implementation of the main program: Demo_response2.java
The Content-disposition property is used as an identification field for the download file in the rfc2616 http://www.rfc-editor.org/rfc/rfc2616.pdf Chapter 19.5 Additional In Features
Have introduction, specific introduction please see Http://www.rfc-
The page HTTP status query is as follows, the purpose is to do CDN acceleration, the CDN said to turn around the information of Set-cookie
Return Status code: 200The page returns head information as followsDate:mon, 09:02:08 GMTserver:apache/2.2.22
When you serve a document from a Web server, you might want to immediately prompt the user to save the file directly to the user's disk, without opening it in the browser. however, for known mime (Multipurpose Internet Mail Extensions) types such as
Get to a short connection, you need to convert the short connection to a real URL, through the search data, found that PHP provides a function get_headers (), you can complete this task, first get the header information, and then analyze the jump
Request headers===========
The 1.Accept belongs to the request header, and the content-type belongs to the entity header.
The 2.Accept represents the type of data that the sender (client) wants to accept.For example: Accept:text/xml;The type of data
Header
explain
Example
Accept-ranges
Indicates whether the server supports the specified range request and what kind of staging request
Accept-ranges:bytes
Age
Estimated time (in seconds, non-negative)
HTTP Request Header:The accept: text/html, image/* browser uses this header to tell the server the supported data typesAccept-charset: the browser uses this header to tell the server the character set it uses.Accept-encoding: the browser uses this
Date: The date header field indicates the message sending time. The description format of the time is defined by rfc822. For example, Date: Mon, 31 Dec 2001 04: 25: 57gmt.
Age: When the current server uses its own cached entities to respond to
The HTTP status query on the page is as follows. The purpose is to accelerate CDN. The Set-Cookie return status code in the "Turn" message about CDN is as follows: 200 the HEAD information returned on the webpage is as follows: Date: Mon, 03Mar201409
Intercept only get requests, and modify the contents of the header to feedback to the client[Java] View plain copy import java.io.ioexception; import java.lang.reflect.method; import javax.ws.rs.get;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.