CN103095783A - Method and device for web application debugging - Google Patents
Method and device for web application debugging Download PDFInfo
- Publication number
- CN103095783A CN103095783A CN2011103501893A CN201110350189A CN103095783A CN 103095783 A CN103095783 A CN 103095783A CN 2011103501893 A CN2011103501893 A CN 2011103501893A CN 201110350189 A CN201110350189 A CN 201110350189A CN 103095783 A CN103095783 A CN 103095783A
- Authority
- CN
- China
- Prior art keywords
- web
- default
- http request
- domain name
- address
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a method and a device for web application debugging. The method for the web application debugging comprises the following steps: analyzing a first hyper text transport protocol (HTTP) request through the obtaining of the first HTTP request of a default request port; confirming a first realm name of the first HTTP request; confirming a first preset transmission port corresponding to the first realm name; transmitting the first HTTP request to a corresponding web application through the first preset transmission port; receiving a response content returned by the web application; and returning the response content to a browser which sends the first HTTP request through the default request port. A plurality of web applications in a distributed web system can be simultaneously debugged on a same computer, remote file replication and remote switch operation among a plurality of computers are eliminated, and then operation efficiency of the deployment and the deployment for the web applications in the distributed web system is improved.
Description
Technical field
The present invention relates to the network system field, relate in particular to method and device that a kind of Web of debugging uses.
Background technology
Be distributed in many Web server main frames on LAN or WAN by Ad hoc mode or carry out collaborative work by the mode that special equipment is responsible for organizational scheduling and form a Web website, jointly share the user to the Web request load of this website, such system is called as Distributed Web System.Distributed Web System comprises a plurality of Web that are associated and uses.In formal environments and common test environment, different Web uses and generally can be deployed on different computers, and exists interrelated or dependence between each Web application.On stream during the developer, often need simultaneously that these Web that are associated of operation use the debugging of carrying out Distributed Web System in local debugging enironment.
For example, a Distributed Web System APP comprises that three Web use:
Front-end A (being abbreviated as FEA), the domain name of common test environment peripheral access FEA is http://fea.taobao.org, and port is 80 of acquiescence, and it is 110.110.0.10 that domain name is pointed to the IP address.
Front-end B (being abbreviated as FEB), the domain name of common test environment peripheral access FEB is http://feb.taobao.org, and port is 80 of acquiescence, and it is 110.110.0.20 that domain name is pointed to the IP address.
Service Center (being abbreviated as SC), the domain name of common test environment peripheral access SC is http://sc.taobao.org, and port is 80 of acquiescence, and it is 110.110.0.30 that domain name is pointed to the IP address.
These three Web are applied in and are deployed in respectively in the common test environment on different machines, and wherein, FEB depends on SC, and FEA depends on FEB and SC simultaneously.Because Existence dependency relationship, so when FEB being carried out this locality debugging, get and move simultaneously FEB and SC; When FEA being carried out this locality debugging, move simultaneously FEA, FEB, these three application of SC.
This distributed system APP may be the sub-systems in whole system in addition.Other subsystems that usually can not break away from the common test environment to distributed debugger system the time independently carry out this locality debugging to described distributed system APP.
Get first by the user log-in authentication subsystem and could access such as entering distributed system APP.For other subsystems with the common test environment carry out level and smooth docking, when debugging in this locality, need to keep domain name and the port of each Web application external reference constant.Use for three Web under distributed system APP, when also namely debug this locality, the domain name of access FEA is that http://fea.taobao.org and port are 80, the domain name of access FEB when being http://feb.taobao.org corresponding port be still 80, during the domain name http://sc.taobao.org of access SC, corresponding ports is still 80.
These two restrictions make this locality debugging that can't realize simply Distributed Web System on unit, because generally speaking FEA, FEB, SC have specific Web server separately, all 80 ports of acquiescence due to access port, if move simultaneously their Web server examples separately on a computer, that port collision will occur.
At present, in the technical scheme of debugging Distributed Web System, FEA, FEB, SC are used and be deployed in respectively on three computers, then revise the machine domain name mapping hosts file of these three computers, the domain name of above-mentioned three application is mapped to the local computer of correspondence.Wherein, FEA uses and is mapped to the computer that FEA uses the place, and FEB uses and is mapped to the computer that FEB uses the place, and SC uses and is mapped to the computer that SC uses the place.When application was debugged to FEA, FEA used and need to call FEB application and SC application, therefore three computers is moved simultaneously.
The applicant finds to exist at least in above-mentioned technology following technical problem in realizing the process of the present application:
When Distributed Web System being carried out this locality debugging, there is relation interrelated and that call due to each Web in the Web system between using, therefore need to move simultaneously a plurality of Web that are associated uses, because using, a Web in the Web system need to be deployed in separately on a computer, cause to move simultaneously many computers when a Web application is debugged.And need to carry out handover operation between these computers when debugging, need to carry out the transmission back of coming of file toward contact between these computers, make debug process take a large amount of resources, and make debug process more complicated.
Summary of the invention
Method and device that the application provides a kind of Web of debugging to use, to solve in prior art when Distributed Web System is debugged, each Web in Distributed Web System must be used and be deployed in respectively on different computers, need to carry out handover operation during debugging between each computer, need to be between computer transfer files back and forth, cause debug process to take a large amount of resources, and make the problem of debug process complexity.
For the problems referred to above, the application provides a kind of Web of the debugging method of system, and N Web in the Web system uses and be arranged on a terminal, each Web uses corresponding domain name, and wherein, N is more than or equal to 2, described N is interrelated and call between using, and described method specifically comprises:
Obtain a HTTP request of default request port, and determining that a described HTTP request is after described N Web uses corresponding HTTP request, a described HTTP request is resolved, determine the first domain name that a described HTTP asks;
According to described the first domain name that prestores and the first default corresponding relation that forwards port, determine the described first default forwarding port that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application;
Receive described Web and use the response contents that returns, described response contents is turned back to the browser that sends a described HTTP request by the default request port.
Preferably, obtain a HTTP request of default request port at the acting server that arranges on described terminal before, further comprise:
Receive the request that the user uses described N Web, and generate a HTTP request according to described request;
Corresponding relation by between the first domain name of prestoring and default IP address carries out home domain name to a described HTTP request and resolves, and obtains the described default IP address of a described HTTP request correspondence, and described default IP address is system default the machine IP address.
Preferably, described a described HTTP request is resolved, determines described first domain name of a HTTP request, be specially:
Described acting server reads the first domain name from the Host item of a HTTP request header information.
Preferably, described described the first domain name that prestores and the first default corresponding relation that forwards port are specially: described the first domain name is corresponding one by one with the described first default forwarding port.
Preferably, during N described Web uses, a Web uses corresponding one the unique described first default port that forwards.
Preferably, described presetting by described first forwards port with the Web application that a described HTTP asks to be forwarded to correspondence, specifically comprises:
According to the described first default corresponding relation that forwards the real ip address of port and Web application that prestores, determine the real ip address that requested described Web uses, by the real ip address that the described Web that determines uses, the Web that a described HTTP request is forwarded to correspondence is used.
Preferably, to be that real ip address and described first that described Web uses is preset the forwarding port corresponding one by one for described the described first default corresponding relation that forwards the real ip address that port and described Web use that prestores.
Preferably, described default IP address is system default the machine IP address or PE test machine IP address, and described method also further comprises:
A described HTTP request is being carried out home domain name when resolving, the domain name mapping result of a HTTP request is being switched between described system default the machine IP address or described PE test machine IP address.
In addition, the device that the application provides a kind of Web of debugging to use comprises:
Browser receives the request that the user uses described N Web, and generates a HTTP by described request and ask, and receives the corresponding contents of the described HTTP that described acting server returns;
The home domain name resolver, the corresponding relation by between described the first domain name of prestoring and system default the machine IP address carries out home domain name to a described HTTP request and resolves, and obtains corresponding acquiescence the machine IP address;
acting server, obtain a HTTP request of default request port, and after determining that the HTTP request of correspondence is used in a described HTTP request for described N Web, a described HTTP request is resolved, determine the first domain name of a described HTTP request, according to described the first domain name that prestores and the first default corresponding relation that forwards port, determine the described first default port that forwards that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application, receive described Web and use the response contents that returns, described response contents is turned back to the browser that sends a described HTTP request by the default request port,
Web Application Server after receiving a described HTTP request, generate the response contents that the Web corresponding with a described HTTP request uses, and the response contents that described Web is used returns to described acting server.
Preferably, also comprise:
The domain name transducer switches the domain name mapping result of a HTTP request between described system default the machine IP address or described PE test machine IP address.
Beneficial effect is as follows:
Method and device that a kind of Web of debugging that provides by the application uses, realized on a computer debugging to Distributed Web System, and then save between many computers that telefile copies and remote operation is switched, and then deployment that the Web in Distributed Web System is used and the operating efficiency of debugging have been improved.
And by described method, can realize the result that described HTTP request is carried out after home domain name is resolved is selected.And then realize in debugging quick switching to the domain name mapping result.
Description of drawings
Fig. 1 is a kind of schematic diagram of debugging the method for Web application of the embodiment of the present application;
Fig. 2 is the embodiment of the present application acting server forwarding process figure;
Fig. 3 is that the embodiment of the present application is to the concrete setting procedure figure of Switchhost plug-in unit;
Fig. 4 is the apparatus structure schematic diagram that the debugging Web of the embodiment of the present application uses.
Embodiment
Method and device that the embodiment of the present application provides a kind of Web of debugging to use, in order to use under the prerequisite of the domain name of external reference and port not changing Web, a plurality of Web that can realize moving simultaneously Distributed Web System on a station terminal use and carry out this locality and debug.
Below in conjunction with accompanying drawing and specific embodiment, scheme provided by the present invention is described in detail.
As described in Figure 1, the method that a kind of Web of debugging that the embodiment of the present application provides uses, the N of this Distributed Web System Web uses and is arranged on same terminal, wherein N is more than or equal to 2, between described N application interrelated with call.The specific implementation flow process of the embodiment of the present application institute supplying method is as follows:
When the home domain name parsing is carried out in the one HTTP request, the corresponding relation of the domain name that the Web that prestores in the etc/hosts file of the machine uses and default IP address, so after receiving the HTTP request that the user quotes a certain web, can be according to the domain Name acquisition in the HTTP request to default IP address.
In the embodiment of the present application, because need debugging that unit carries out each application in the Web system (namely, with a plurality of web in the web system use be arranged on same computer after, then each web is used debugs), so the HTTP request of need to a certain Web of request using be sent back to the machine.In order to achieve the above object, default IP described in the embodiment of the present application address can be made as system default the machine IP address, and therefore, after resolving by home domain name, described HTTP asks to be sent back to the machine and resolves.
Because step 102 is preset the IP address and is set to the machine address, so when the Web that is arranged on the machine is used the transmission request, generation the one HTTP request that the meeting of the machine browser is corresponding, and a described HTTP request is sent by the default request port, acting server can be monitored the HTTP request from the default request port, and after obtaining a described HTTP request, a described HTTP request is resolved.
Wherein, acting server can carry out corresponding parsing to a HTTP request according to the difference of access mode.For example, if a described HTTP request is according to domain name access, deposits in the Host of described header and be domain name; If according to IP address access, deposit the address into IP in Host.A described HTTP request is according to domain name access in the embodiment of the present application, and what therefore deposit in the Host item of described HTTP request header information is domain name.Acting server reads the first domain name after receiving the HTTP request from the Host item of a HTTP request header information.
Because the IP address that obtains by step 103 be all system default the machine IP address, N the Web application area that a HTTP who is therefore the machine system default IP address by described the first domain name with the IP address in the present embodiment asks separated.
In specific embodiment, because there is the relation of calling between this N Web uses, therefore before N Web in Distributed Web System uses operation, each application in need to using this N Web arranges the first default port that forwards of a correspondence, and each Web during this N Web uses uses corresponding one unique first and defaultly forwards port, and then realizes that N Web is applied in and mutually call Shi Buhui and mutual conflict between port occurs.And Web uses and the first default corresponding relation that forwards between port also is pre-stored in acting server.
Because each Web in N Web application uses corresponding first domain name, and first unique default forwarding port of each first domain name correspondence, therefore described the first domain name and the described first default forwarding port are corresponding one by one.
Further, described acting server is by the first domain name that obtains in step 103 and the first domain name that prestores and the first default one-to-one relationship that forwards port, can obtain to forward the first default forwarding port that a described HTTP asks the Web application of correspondence, so acting server asks to be forwarded to corresponding Web application by the described first default port that forwards with a described HTTP.
Shown in Figure 2, it is forwarded to a described HTTP request detailed process that corresponding Web uses for acting server, and is as follows:
Step 201 according to the described first default corresponding relation that forwards the real ip address of port and Web application that prestores, is determined the real ip address that requested described Web uses.
In order to make described HTTP request can send on the real server of corresponding Web application, so need to obtain the real ip address that Web uses.In the present embodiment, the described first default corresponding relation that forwards port and the real ip address of Web application that prestores in acting server.
Further, after proxy server parses obtains described the first domain name, according to the described first default corresponding relation that forwards the real ip address of port and Web application that prestores, obtain the real ip address that Web uses.
Step 202 is forwarded to corresponding Web by the real ip address of determining with described HTTP request and uses.
Use if comprise three Web in the present embodiment in Distributed Web System, and three Web use and have mutual call relation, according to concrete applied environment, the method that the embodiment of the present application is provided is described further, and specifically comprises:
Comprise three Web in the present embodiment in Distributed Web System and use, be respectively FEA, FEB, three application of SC, when application is debugged to FEA, can call FEB application and SC and use; When FEB is debugged, can call SC and use.Owing to being the relation of mutually calling between FEA, FEB, three application of SC, so when FEA is debugged, can go together and call FEB, SC and use, so simultaneously FEA, FEB, three of SC are used the request of transmission.
So described three Web be applied in run on a terminal before, the port that described three Web are used carries out following setting:
The corresponding ports that FEA uses is 8080;
The corresponding ports that FEB uses is 8180;
The corresponding ports that SC uses is 8280;
Wherein, the configuration at described acting server can be specifically:
Acting server is monitored FEA, the FEB from 80 ports, the HTTP request of three application of SC.Be fea.taobao.org with domain name, port is: 80 HTTP request is forwarded to the IP address and is: http: // 127.0.0.1:8080;
Be feb.taobao.org with domain name, port is: 80 HTTP request is forwarded to the IP address and is: http: // 127.0.0.1:8180;
Be sc.taobao.org with domain name, port is: 80 HTTP request is forwarded to the IP address and is: IP address http: // 127.0.0.1:8280;
By above-mentioned setting, the default port of the correspondence of described FEA, FEB, three application of SC is pre-stored on acting server.
Three application of FEA, FEB, SC after the port setting is completed run on a terminal, and these three application domain name of correspondence respectively are fea.taobao.org, feb.taobao.org, sc.taobao.org.And arrange these three use default IP address corresponding to domain name in the machine domain name mapping file etc hosts, resolve through home domain name for the HTTP request that makes these three application and can be forwarded back to the machine afterwards, therefore should default IP the address be system default the machine IP address, specifically arrange as follows:
The domain name that FEA is corresponding is: http://fea.taobao.org, and the IP address that obtains after home domain name is resolved is: 127.0.0.1; Port is: 80;
The domain name that FEB is corresponding is: http://feb.taobao.org, and the IP address that obtains after home domain name is resolved is: 127.0.0.1; Port is: 80;
The domain name that SC is corresponding is: http://sc.taobao.org, and the IP address that obtains after home domain name is resolved is: 127.0.0.1; Port is: 80;
By above-mentioned being arranged on, FEA, FEB, three application of SC are carried out after home domain name resolves, obtained default IP address and be system default the machine IP address, will be forwarded back the machine by the default request port so these three Web use corresponding HTTP request.
FEA, FEB after resolving through home domain name, the HTTP request of three application of SC will be sent back to the machine by described default request port, so described acting server can be monitored the HTTP request from the default request port, thereby and obtain FEA, FEB, three application of SC HTTP separately and ask.
Described acting server is resolved three application of FEA, FEB, the SC HTTP request separately that gets, described acting server reads domain name from the Host item of HTTP request header information, and then obtain FEA, FEB, three domain names of using correspondence of SC, its concrete corresponding relation is as follows:
The domain name that FEA is corresponding is: http://fea.taobao.org;
The domain name that FEB is corresponding is: http://feb.taobao.org;
The domain name that SC is corresponding is: http://sc.taobao.org.
After HTTP request process home domain name parsing due to FEA, FEB, three application of SC, the default IP address that obtains is all system default the machine IP address, therefore, obtain the domain name of FEA, FEB, three application correspondences of SC by proxy server parses after, can be with these three application area separately.
Further, acting server is used the default port of the correspondence that arranges separately by three of FEA, FEB, the SC that prestores, and reads respectively FEA, FEB, three each self-corresponding default ports of application of SC, and is specific as follows:
The corresponding ports that FEA uses is 8080;
The corresponding ports that FEB uses is 8180;
The corresponding ports that SC uses is 8280.
Acting server and then obtains the real ip address of the server of FEA, FEB, three application of SC after the corresponding ports that obtains FEA, FEB, three application of SC, specific as follows:
The port that FEA is corresponding is 8080, and real ip address is: http: // 127.0.0.1:8080
The port that FEB is corresponding is 8180, and real ip address is: http: // 127.0.0.1:8180
The port that SC is corresponding is 8280, and real ip address is: http: // 127.0.0.1:8280
The real ip address of the server of FEA, the FEB of acting server by obtaining, three application of SC is used corresponding HTTP request with FEA, FEB, three of SC and is forwarded to FEA, FEB, three application of SC.
The response contents that described acting server reception FEA, FEB, three application of SC are returned, and described response contents is turned back to the browser that sends the HTTP request by the default request port.
In addition, in the another kind of specific embodiment of the application, a HTTP request is being carried out after home domain name resolves, the default IP address of acquisition is system default the machine IP address or PE test machine IP address.
A described HTTP request is being carried out home domain name when resolving, the home domain name analysis result of a HTTP request is being switched between described system default the machine IP address or described PE test machine IP address.
By described method, can realize the result that described HTTP request is carried out after home domain name is resolved is selected.
In order to realize the switching between this IP address, specifically select in the embodiment of the present application a kind of Switchhost (conversion host) plug-in unit to complete switching, the analysis result that the home domain name that the Web that can prestore uses is resolved in the Switchhost plug-in unit.In the embodiment of the present application, home domain name analysis result that Web uses can be set be system default the machine IP address or PE test machine IP address in described Switchhost plug-in unit, therefore, described default IP address is system default the machine IP address or PE test machine IP address.
The applied environment that following basis is concrete is described further the embodiment of the present application.
For example, in the etc/hosts of described plug-in unit file, http://fea.taobao.org and http://feb.taobao.org are set, and the IP address after resolving is system default the machine IP address 127.0.0.1 by home domain name, IP address after resolving is common test environment machine IP address 110.110.0.30 to http://sc.taobao.org by home domain name, and the debugging of these three application is combined as the SC of FEB+ common test environment of FEA+ the machine of the machine.Because in specific environment, the IP address of home domain name after resolving can be set is the machine IP address or common test environment machine IP address for FEA, FEB and SC, the debugging of these three application is combined as and can is:
The machine FEA+ the machine FEB+ the machine SC
The public SC of the machine FEA+ the machine FEB+
The public SC of the public FEB+ of the machine FEA+
The public SC of public FEA+ the machine FEB+
The public FEB+ the machine of public FEA+ SC
Public FEA+ the machine FEB+ the machine SC
As shown in Figure 3, as follows to specifically arranging of described Switchhost plug-in unit:
Step 301 is selected the submenu Host Management under Switchhost, enters the HostsManagement administration interface;
Step 302 arranges if will add a new hosts, and that just clicks " Add " button, the HostsEdit interface occurs, then inputs one by one the host-ip pairing, and name is set for this hosts;
The machine FEA+ the machine FEB+ the machine SC
The public SC of the machine FEA+ the machine FEB+
The public SC of the public FEB+ of the machine FEA+
The public SC of public FEA+ the machine FEB+
The public FEB+ the machine of public FEA+ SC
Public FEA+ the machine FEB+ the machine SC
After having created a plurality of Hosts settings, be provided as current running environment by selecting one of them Hosts.The Switchhost shortcut menu that only needs the click browser status bar, choose the Hosts that needs operation to arrange, Switchhost can be automatically replaces to the Host-IP pairing of the Hosts that chooses in arranging with the etc/hosts file content of operating system, and the home domain name of operating system is resolved and will request be set to HTTP based on the Hosts that chooses and carry out home domain name and resolve afterwards.
Above-mentioned debugging is combined in specific implementation process and all might occurs, can be for above-mentioned each debugging combination arrange a hosts version in the Switchhost plug-in unit, then the keyswitch function by the Switchhost plug-in unit switches to the arbitrary debugging combination in above-mentioned debugging combination fast.Thereby realized the debugging enironment multiple choices.
Because only need to use the agency service function in the present embodiment, need to not dispose Web and use on described HTTP Server, and when debugging visit capacity seldom, so to the EMS memory occupation of HTTP Server seldom.
Be illustrated in figure 4 as the apparatus structure that a kind of Web of debugging of the embodiment of the present application uses, the concrete structure of this device comprises the following functions unit:
Home domain name resolver 402, be used for by the corresponding relation between described the first domain name of prestoring and system default the machine IP address, home domain name is carried out in a described HTTP request resolves, obtain corresponding acquiescence the machine IP address, and receive the corresponding contents of the described HTTP that described retransmission unit returns;
By the corresponding relation between described the first domain name of prestoring and system default the machine IP address, home domain name is carried out in a described HTTP request resolves, obtain corresponding acquiescence the machine IP address, and receive the corresponding contents of the described HTTP that described retransmission unit returns;
acting server 403, be used for obtaining a HTTP request of default request port, and after determining that the HTTP request of correspondence is used in a described HTTP request for described N Web, a described HTTP request is resolved, determine the first domain name of a described HTTP request, according to described the first domain name that prestores and the first default corresponding relation that forwards port, determine the described first default port that forwards that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application, receive described Web and use the response contents that returns, described response contents is turned back to the browser that sends a described HTTP request by the default request port.
In addition, described device also comprises:
The application is useful specific as follows:
Method and device that the application provides a kind of Web of debugging to use, by obtaining a HTTP request of default request port, a described HTTP request is resolved, determine the first domain name of a described HTTP request, determine the described first default port that forwards that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application, and then receive the response contents that described Web application is returned, described response contents is turned back to the browser that sends a described HTTP request by the default request port.In addition
Realize on a computer debugging to Distributed Web System, and then save between many computers that telefile copies and remote operation is switched, and then improved deployment that the Web in Distributed Web System is used and the operating efficiency of debugging.
In addition, a described HTTP request is being carried out home domain name when resolving, the domain name mapping result of a HTTP request is being switched between described system default the machine IP address or described PE test machine IP address.
And by described method, can realize the result that described HTTP request is carried out after home domain name is resolved is selected.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.
Claims (10)
1. debug the method that Web uses for one kind, N Web in the Web system uses and is arranged on a terminal, and each Web uses domain name of correspondence, wherein, N is more than or equal to 2, and described N interrelated and call between using, it is characterized in that, described method specifically comprises:
Obtain a HTTP request of default request port, and determining that a described HTTP request is after described N Web uses corresponding HTTP request, a described HTTP request is resolved, determine the first domain name that a described HTTP asks;
According to described the first domain name that prestores and the first default corresponding relation that forwards port, determine the described first default forwarding port that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application;
Receive described Web and use the response contents that returns, described response contents is turned back to the browser that sends a described HTTP request by the default request port.
2. the method for claim 1, is characterized in that, obtain a HTTP request of default request port at the acting server that arranges on described terminal before, further comprises:
Receive the request that the user uses described N Web, and generate a HTTP request according to described request;
By the corresponding relation between the first domain name of prestoring and default IP address, home domain name to be carried out in a described HTTP request resolve and obtain a described described default IP address corresponding to HTTP request, described default IP address is system default the machine IP address.
3. the method for claim 1, is characterized in that, described a described HTTP request resolved, and determines described first domain name of a HTTP request, is specially:
Described acting server reads the first domain name from the Host item of a HTTP request header information.
4. method as claimed in claim 3, is characterized in that, described described the first domain name that prestores and the first default corresponding relation that forwards port are specially: described the first domain name is corresponding one by one with the described first default forwarding port.
5. method as claimed in claim 4, is characterized in that, during N described Web uses, a Web uses corresponding one the unique described first default port that forwards.
6. the method for claim 1, is characterized in that, described presetting by described first forwards port with the Web application that a described HTTP asks to be forwarded to correspondence, specifically comprises:
According to the described first default corresponding relation that forwards the real ip address of port and Web application that prestores, determine the real ip address that requested described Web uses, by the real ip address that the described Web that determines uses, the Web that a described HTTP request is forwarded to correspondence is used.
7. method as claimed in claim 6, is characterized in that, it is corresponding one by one that described the described first default corresponding relation that forwards the real ip address that port and described Web use that prestores is that real ip address and described first that described Web uses is preset the forwarding port.
8. method as claimed in claim 2, is characterized in that, described default IP address is system default the machine IP address or PE test machine IP address, and described method also further comprises:
A described HTTP request is being carried out home domain name when resolving, the domain name mapping result of a HTTP request is being switched between described system default the machine IP address or described PE test machine IP address.
9. debug the device that Web uses for one kind, it is characterized in that, comprising:
Browser receives the request that the user uses described N Web, and generates a HTTP by described request and ask, and the corresponding contents of the described HTTP that returns of Receiving Agent server;
The home domain name resolver, the corresponding relation by between described the first domain name of prestoring and system default the machine IP address carries out home domain name to a described HTTP request and resolves, and obtains corresponding acquiescence the machine IP address;
acting server, obtain a HTTP request of default request port, and after determining that the HTTP request of correspondence is used in a described HTTP request for described N Web, a described HTTP request is resolved, determine the first domain name of a described HTTP request, according to described the first domain name that prestores and the first default corresponding relation that forwards port, determine the described first default port that forwards that described the first domain name is corresponding, by the described first default port that forwards, a described HTTP request is forwarded to corresponding Web application, receive described Web and use the response contents that returns, described response contents is turned back to the browser that sends a described HTTP request by the default request port,
Web Application Server after receiving a described HTTP request, generate the response contents that the Web corresponding with a described HTTP request uses, and the response contents that described Web is used returns to described acting server.
10. device as claimed in claim 9, is characterized in that, also comprises:
The domain name transducer switches the domain name mapping result of a HTTP request between described system default the machine IP address or described PE test machine IP address.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110350189.3A CN103095783B (en) | 2011-11-08 | 2011-11-08 | A kind of method and device debugging Web application |
HK13107586.0A HK1180487A1 (en) | 2011-11-08 | 2013-06-28 | Method and device for testing a web application web |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110350189.3A CN103095783B (en) | 2011-11-08 | 2011-11-08 | A kind of method and device debugging Web application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103095783A true CN103095783A (en) | 2013-05-08 |
CN103095783B CN103095783B (en) | 2015-10-14 |
Family
ID=48207911
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110350189.3A Active CN103095783B (en) | 2011-11-08 | 2011-11-08 | A kind of method and device debugging Web application |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103095783B (en) |
HK (1) | HK1180487A1 (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104202334A (en) * | 2014-09-16 | 2014-12-10 | 广州金山网络科技有限公司 | Network connection establishing method and device |
CN104239207A (en) * | 2014-09-17 | 2014-12-24 | 广州华多网络科技有限公司 | Method and device for debugging application program |
CN104954363A (en) * | 2015-04-30 | 2015-09-30 | 北京嘀嘀无限科技发展有限公司 | Method and device for generating interface document |
CN104954380A (en) * | 2015-06-23 | 2015-09-30 | 福建天晴数码有限公司 | Android based monitoring preventing method and system under the condition of public WIFI (wireless fidelity) |
CN106055480A (en) * | 2016-06-02 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Webpage debugging method and terminal |
CN106919413A (en) * | 2015-12-25 | 2017-07-04 | 北京奇虎科技有限公司 | A kind of method and apparatus that application APP is called by webpage |
CN107566203A (en) * | 2016-07-01 | 2018-01-09 | 北京京东尚科信息技术有限公司 | A kind of online service method of testing and system |
CN108055168A (en) * | 2017-12-29 | 2018-05-18 | 广州品唯软件有限公司 | A kind of http protocol debuggings systems, devices and methods |
CN108076123A (en) * | 2016-11-11 | 2018-05-25 | 腾讯科技(深圳)有限公司 | Webpage adjustment method, apparatus and system |
CN108153543A (en) * | 2017-12-29 | 2018-06-12 | 北京酷我科技有限公司 | A kind of method of server address switching |
CN110545335A (en) * | 2018-05-29 | 2019-12-06 | 阿里巴巴集团控股有限公司 | Internet protocol address acquisition method, server and system |
WO2020164526A1 (en) * | 2019-02-15 | 2020-08-20 | 腾讯科技(深圳)有限公司 | Control method for nodes in distributed system and related device |
CN111831530A (en) * | 2019-04-15 | 2020-10-27 | 北京字节跳动网络技术有限公司 | Test method and device |
US20210089419A1 (en) * | 2019-09-25 | 2021-03-25 | Alibaba Group Holding Limited | Debugging unit and processor |
CN113377678A (en) * | 2021-07-13 | 2021-09-10 | 挂号网(杭州)科技有限公司 | Test environment switching method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1700682A (en) * | 2004-05-21 | 2005-11-23 | 迈普(四川)通信技术有限公司 | Virtual domain name resolution proxy method and system |
CN1929399A (en) * | 2006-09-12 | 2007-03-14 | 成都迈普产业集团有限公司 | Embedded Web network management system and its interactive method |
CN101523865A (en) * | 2006-08-03 | 2009-09-02 | 思杰系统有限公司 | Systems and methods for using an HTTP-aware client agent |
US20100132009A1 (en) * | 2008-11-25 | 2010-05-27 | Prakash Khemani | Systems and Methods for HTTP Callouts for Policies |
-
2011
- 2011-11-08 CN CN201110350189.3A patent/CN103095783B/en active Active
-
2013
- 2013-06-28 HK HK13107586.0A patent/HK1180487A1/en unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1700682A (en) * | 2004-05-21 | 2005-11-23 | 迈普(四川)通信技术有限公司 | Virtual domain name resolution proxy method and system |
CN101523865A (en) * | 2006-08-03 | 2009-09-02 | 思杰系统有限公司 | Systems and methods for using an HTTP-aware client agent |
CN1929399A (en) * | 2006-09-12 | 2007-03-14 | 成都迈普产业集团有限公司 | Embedded Web network management system and its interactive method |
US20100132009A1 (en) * | 2008-11-25 | 2010-05-27 | Prakash Khemani | Systems and Methods for HTTP Callouts for Policies |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104202334A (en) * | 2014-09-16 | 2014-12-10 | 广州金山网络科技有限公司 | Network connection establishing method and device |
CN104239207A (en) * | 2014-09-17 | 2014-12-24 | 广州华多网络科技有限公司 | Method and device for debugging application program |
CN104954363B (en) * | 2015-04-30 | 2018-05-22 | 北京嘀嘀无限科技发展有限公司 | For generating the method and apparatus of interface document |
CN104954363A (en) * | 2015-04-30 | 2015-09-30 | 北京嘀嘀无限科技发展有限公司 | Method and device for generating interface document |
CN104954380A (en) * | 2015-06-23 | 2015-09-30 | 福建天晴数码有限公司 | Android based monitoring preventing method and system under the condition of public WIFI (wireless fidelity) |
CN106919413A (en) * | 2015-12-25 | 2017-07-04 | 北京奇虎科技有限公司 | A kind of method and apparatus that application APP is called by webpage |
CN106055480B (en) * | 2016-06-02 | 2021-03-16 | 腾讯科技(深圳)有限公司 | Method and terminal for debugging webpage |
CN106055480A (en) * | 2016-06-02 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Webpage debugging method and terminal |
CN107566203A (en) * | 2016-07-01 | 2018-01-09 | 北京京东尚科信息技术有限公司 | A kind of online service method of testing and system |
CN108076123A (en) * | 2016-11-11 | 2018-05-25 | 腾讯科技(深圳)有限公司 | Webpage adjustment method, apparatus and system |
CN108153543A (en) * | 2017-12-29 | 2018-06-12 | 北京酷我科技有限公司 | A kind of method of server address switching |
CN108055168A (en) * | 2017-12-29 | 2018-05-18 | 广州品唯软件有限公司 | A kind of http protocol debuggings systems, devices and methods |
CN108153543B (en) * | 2017-12-29 | 2021-03-02 | 北京酷我科技有限公司 | Server address switching method |
CN110545335A (en) * | 2018-05-29 | 2019-12-06 | 阿里巴巴集团控股有限公司 | Internet protocol address acquisition method, server and system |
US11343233B2 (en) | 2019-02-15 | 2022-05-24 | Tencent Technology (Shenzhen) Company Limited | Node control method and related apparatus in distributed system |
WO2020164526A1 (en) * | 2019-02-15 | 2020-08-20 | 腾讯科技(深圳)有限公司 | Control method for nodes in distributed system and related device |
CN111831530A (en) * | 2019-04-15 | 2020-10-27 | 北京字节跳动网络技术有限公司 | Test method and device |
US20210089419A1 (en) * | 2019-09-25 | 2021-03-25 | Alibaba Group Holding Limited | Debugging unit and processor |
US11755441B2 (en) * | 2019-09-25 | 2023-09-12 | Alibaba Group Holding Limited | Debugging unit and processor |
CN113377678A (en) * | 2021-07-13 | 2021-09-10 | 挂号网(杭州)科技有限公司 | Test environment switching method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103095783B (en) | 2015-10-14 |
HK1180487A1 (en) | 2013-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103095783B (en) | A kind of method and device debugging Web application | |
CN109618005B (en) | Method for calling server and proxy server | |
CN109561171B (en) | Configuration method and device of virtual private cloud service | |
US9251040B2 (en) | Remote debugging in a cloud computing environment | |
CN105430108B (en) | Test environment access method and proxy server | |
CN103108089B (en) | Connection establishment management method of network system and related system thereof | |
CN110012083B (en) | Data transmission method, server and data transmission device | |
US9565161B2 (en) | Automatically replacing localhost as hostname in URL with fully qualified domain name or IP address | |
CN104809816B (en) | Pickup processing method, pickup perform method, pickup method and apparatus and system | |
CN106657180B (en) | Information transmission method and device for cloud service, terminal equipment and system | |
CN108270818A (en) | A kind of micro services architecture system and its access method | |
CN111193773A (en) | Load balancing method, device, equipment and storage medium | |
CN103701948A (en) | Acquisition method and device for configuration information of domain name resolving system | |
CN109815057A (en) | A kind of data back up method and mobile terminal | |
CN104301444A (en) | Network IP acquiring method, device, application platform, client and system | |
CN106357814B (en) | A kind of document handling method, agency service end and client | |
KR20110053819A (en) | Method and apparatus for providing pair play service | |
CN109561167A (en) | A kind of domain name analytic method and device | |
CN102946404A (en) | Method for displaying selectively-synchronized file folders at user terminal and cloud storage system | |
CN103944961A (en) | Application sharing method, device and system | |
CN112311669B (en) | Network service switching method, device, system and storage medium | |
CN116599900A (en) | Cloud environment access method and device | |
KR20090022341A (en) | Ubiquitous web service gateway and method | |
CN115567521A (en) | Communication method and device between local area network and public cloud, and computing equipment | |
JP2011109258A (en) | Information communication system, information retrieval server, information retrieval program, communication device, and request source communication device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1180487 Country of ref document: HK |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1180487 Country of ref document: HK |