CN112788073A - Novel Cookie processing method for non-browser end - Google Patents

Novel Cookie processing method for non-browser end Download PDF

Info

Publication number
CN112788073A
CN112788073A CN201911078113.2A CN201911078113A CN112788073A CN 112788073 A CN112788073 A CN 112788073A CN 201911078113 A CN201911078113 A CN 201911078113A CN 112788073 A CN112788073 A CN 112788073A
Authority
CN
China
Prior art keywords
cookie
browser
request
information
novel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911078113.2A
Other languages
Chinese (zh)
Inventor
黄彦齐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Faisco Internet Technology Co ltd
Original Assignee
Guangzhou Faisco Internet Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Faisco Internet Technology Co ltd filed Critical Guangzhou Faisco Internet Technology Co ltd
Priority to CN201911078113.2A priority Critical patent/CN112788073A/en
Publication of CN112788073A publication Critical patent/CN112788073A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a novel Cookie processing method for a non-browser end, which comprises the following steps: receiving a Request; receiving a response from a server side under a client side of a non-browser side; viewing the Set-Cookie; checking whether the response header contains the Set-Cookie information or not, and if not, ending the operation; acquiring content; if the response header contains the Set-Cookie, acquiring the content carried in the Set-Cookie; pre-treating; preprocessing the content carried in the Set-Cookie, analyzing the information of the current Cookie, and storing the Cookie list in a memory of the current client after the analysis is finished. The invention can use the scheme to receive, analyze, store and use Cookie with the service end at the non-browser end, so that HTTP can be adopted at the non-browser end and the Cookie is used for tracking the conversation.

Description

Novel Cookie processing method for non-browser end
Technical Field
The invention relates to the technical field of computer software, in particular to a novel Cookie processing method for a non-browser end.
Background
Cookies are one way in which a server or script can maintain information on a browser under the HTTP protocol. The server and the browser transmit data by using an HTTP protocol. The HTTP protocol is a stateless protocol. Once the data exchange is finished, the connection between the client and the server is closed, and a new connection is required to be established for exchanging data again. This means that the server cannot track the session from the connection. The application scenario of Cookie is that a server can track the session in multiple connections conveniently. The Cookie is realized in a mode that a server stores a small text file on a browser of a user, when the browser requests the server, the Cookie of the browser is sent to the server along with the request, and the server can access the Cookie information. The server can utilize the arbitrarines of containing information to filter and maintain the information frequently, so as to track the session state in HTTP transmission and the like.
The technical disadvantage of the prior Cookie is that the Cookie is only suitable for communication between a server and a browser which adopt HTTP protocol communication, and is not suitable for communication of other clients. Therefore, a novel Cookie processing method used by the non-browser side is provided.
Disclosure of Invention
Based on the technical problems in the background art, the invention provides a novel Cookie processing method for a non-browser end.
The invention provides a novel Cookie processing method for a non-browser end, which comprises the following steps:
s1: receiving a Request; receiving a response from a server side under a client side of a non-browser side;
s2: viewing the Set-Cookie; checking whether the response header contains the Set-Cookie information or not, and if not, ending the operation;
s2: acquiring content; if the response header contains the Set-Cookie, acquiring the content carried in the Set-Cookie;
s3: pre-treating; preprocessing the content carried in the Set-Cookie, analyzing the information of the current Cookie, and storing the Cookie list in a memory of the current client after the analysis is finished.
Preferably, when the client needs to send a request to the browser, the client extracts the current domain from the url that needs to send the request, screens a Cookie list with the same domain, the path meeting the specification and not expired from the memory that stores the Cookie list in S3, takes the Cookie list in the request in the form of a key-value pair, places the Cookie list in the Cookie field in the response header, and the server receives the request to parse the Cookie.
Preferably, the parsing manner in S3 is a character cutting method, and the cut character segments are subjected to space-removing and case-unifying operations.
Preferably, the information in S3 includes name, value, domain, path, expiration time or maximum time, HttpOnly, and SecureSite.
Preferably, the storage in S3 is a memory or a magnetic disk.
The beneficial effects of the invention are as follows:
1. the set of scheme can be used at a non-browser end for receiving, analyzing, storing and using Cookie with a service end, so that HTTP can be adopted at the non-browser end, and a session can be tracked by using the Cookie.
2. The mode of using Cookie is not limited by the type of the client terminal, and session tracking can be carried out on any client through the Cookie.
Drawings
Fig. 1 is a schematic flow chart of a novel method for processing cookies used by a non-browser end according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Referring to fig. 1, a novel method for processing cookies used by a non-browser end includes the following steps:
s1: receiving a Request; receiving a response from a server side under a client side of a non-browser side;
s2: viewing the Set-Cookie; checking whether the response header contains the Set-Cookie information or not, and if not, ending the operation;
s2: acquiring content; if the response header contains the Set-Cookie, acquiring the content carried in the Set-Cookie;
s3: pre-treating; preprocessing the content carried in the Set-Cookie, analyzing the information of the current Cookie, and storing the Cookie list in a memory of the current client after the analysis is finished.
In the invention, when a client needs to send a request to a browser, a current domain is extracted from url needing to send the request, a Cookie list with the same domain, the path meeting the specification and not expired is screened from a storage storing the Cookie list in S3, the Cookie list is brought into the request in a key value pair mode, the Cookie list is placed on a Cookie field in a response head, a server receives the request to analyze the Cookie, the analysis mode in S3 is a character cutting method, the cut character fragments are subjected to de-space formatting and uniform case writing operation, information in S3 comprises name, value, domain, path, expiration time or maximum time, HttpOnly and SecureState, and the storage in S3 is a memory or a disk.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

Claims (5)

1. A novel Cookie processing method used by a non-browser end is characterized by comprising the following steps:
s1: receiving a Request; receiving a response from a server side under a client side of a non-browser side;
s2: viewing the Set-Cookie; checking whether the response header contains the Set-Cookie information or not, and if not, ending the operation;
s2: acquiring content; if the response header contains the Set-Cookie, acquiring the content carried in the Set-Cookie;
s3: pre-treating; preprocessing the content carried in the Set-Cookie, analyzing the information of the current Cookie, and storing the Cookie list in a memory of the current client after the analysis is finished.
2. The novel Cookie processing method for the non-browser side according to claim 1, wherein when the client side needs to send a request to the browser side, a current domain is extracted from url that needs to send the request, a Cookie list that has the same domain and the same path meeting the specification and has not expired is screened from a memory that stores the Cookie list in S3, and is brought into the request in a key value pair form and placed on a Cookie field in a response header, and the server side receives the request and parses the Cookie.
3. The method as claimed in claim 2, wherein the parsing in S3 is character cutting, and the cut character fragments are de-formatted and unified case and case.
4. The method as claimed in claim 3, wherein the information in S3 includes name, value, field, path, expiration time or maximum time, HttpOnly and SecureSite.
5. The method for processing Cookie by using a novel non-browser end according to claim 4, wherein the storage in S3 is a memory or a disk.
CN201911078113.2A 2019-11-06 2019-11-06 Novel Cookie processing method for non-browser end Pending CN112788073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911078113.2A CN112788073A (en) 2019-11-06 2019-11-06 Novel Cookie processing method for non-browser end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911078113.2A CN112788073A (en) 2019-11-06 2019-11-06 Novel Cookie processing method for non-browser end

Publications (1)

Publication Number Publication Date
CN112788073A true CN112788073A (en) 2021-05-11

Family

ID=75747641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911078113.2A Pending CN112788073A (en) 2019-11-06 2019-11-06 Novel Cookie processing method for non-browser end

Country Status (1)

Country Link
CN (1) CN112788073A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2362602A1 (en) * 2010-02-27 2011-08-31 Novell, Inc. Techniques for managing a secure communication session
CN102447714A (en) * 2010-10-07 2012-05-09 鸿富锦精密工业(深圳)有限公司 Cookie management method
CN103888490A (en) * 2012-12-20 2014-06-25 上海天泰网络技术有限公司 Automatic WEB client man-machine identification method
US9219787B1 (en) * 2014-11-26 2015-12-22 Ensighten, Inc. Stateless cookie operations server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2362602A1 (en) * 2010-02-27 2011-08-31 Novell, Inc. Techniques for managing a secure communication session
CN102447714A (en) * 2010-10-07 2012-05-09 鸿富锦精密工业(深圳)有限公司 Cookie management method
CN103888490A (en) * 2012-12-20 2014-06-25 上海天泰网络技术有限公司 Automatic WEB client man-machine identification method
US9219787B1 (en) * 2014-11-26 2015-12-22 Ensighten, Inc. Stateless cookie operations server

Similar Documents

Publication Publication Date Title
CN102655481B (en) A kind of instant messaging chat content inspection method based on webpage and system
US7219138B2 (en) Method, apparatus, and system for capturing data exchanged between a server and a user
US10887201B2 (en) Method for automatically monitoring end-to-end end user performance and apparatus for performing the method
Erman et al. Over the top video: The gorilla in cellular networks
CN104135389B (en) A kind of auditing method of the SSH agreement O&M auditing systems based on agent skill group
CN105930363B (en) HTML5 webpage-based user behavior analysis method and device
US20080144655A1 (en) Systems, methods, and computer program products for passively transforming internet protocol (IP) network traffic
CN102594796B (en) Terminal device and user information synchronization method
EP2610767A1 (en) Web page download time analysis
US20110125748A1 (en) Method and Apparatus for Real Time Identification and Recording of Artifacts
CN103297270A (en) Application type recognition method and network equipment
US9961125B2 (en) Messaging API over HTTP protocol to establish context for data exchange
CN107133161B (en) Method and device for generating client performance test script
CN103795762A (en) Reverse agent test system and method
CN102790772B (en) The processing method of Cookie data, server and client side
CN109905873B (en) Network account correlation method based on characteristic identification information
CN104410546A (en) Testing method and device of real-time processing system
CN106656919B (en) A kind of session analytic method and system based on Telnet agreement
CN109640113A (en) A kind of processing method and proxy server of dilatory video data
CN105790960A (en) Traffic identification method and system and traffic gateway
CN104468248A (en) Service performance monitoring method, reverse proxy server, statistical analysis server and system
CN107809681A (en) The method and device of section transmission of video
CN112788073A (en) Novel Cookie processing method for non-browser end
CN102918527B (en) Investigation method and system for web application hosting
CN113438503B (en) Video file restoring method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210511