【0001】
【発明の属する技術分野】
本発明は、サービス停止中であることを表す表示内容をWWWブラウザに送信できるWWWサーバに関するものである。
【0002】
【従来の技術】
WWWサーバ上でさまざまなサービスを動作させWWWブラウザから利用することができる。例えば、インターネット回線を利用したオンラインショッピングサービスなどである(例えば、非特許文献参照。)。
【0003】
WWWサーバ上で動作するサービスは、通常CGIプログラムとして実装されWWWサーバ上で動作する。このようなCGIプログラムは、機能拡張、障害修正などのため、更新されることがある。さらに、CGIプログラムの更新後、更新されたCGIが正常に動作していることを確認することがある。
【0004】
【非特許文献】
楽天サービス総合カタログ2002年10月〜12月 楽天活用ハンドブック、楽天株式会社、p.6
【0005】
【発明が解決しようとする課題】
更新されたCGIプログラムの動作確認中は、動作確認を行うテスターのみCGIプログラムによって提供されているサービスにアクセスでき、他の利用者はサービスにアクセスできないようにしたい。従来は、サービスへのリンクが張ってあるページでサービスが利用できないことを表示するあるいはサービスへのリンクを削除するあるいはCGIプログラムの動作確認中はサービスが利用できないことを利用者に連絡するなどを行う必要があった。
【0006】
しかし、これらの方法では、サービス内のURLに直接アクセスしてきた利用者がそのサービスを利用できてしまうという問題があつた。
【0007】
【課題を解決するための手段】
本発明では、サービスを提供するCGIプログラムにサービス停止フラグを設定できるようにし、WWWブラウザからサービスに対するリクエストがあったとき、サービス停止フラグがオンに設定されている場合は、サービスが停止していることを表す表示内容を送信し、サービス停止フラグがオフに設定されている場合は、通常のサービスを提供する。ただし、サービス停止フラグがオンに設定されている場合かつ特定のcookieあるいはクエリー文字列がWWWブラウザからのリクエスト中に含まれていた場合は、通常のサービスを提供する。
【0008】
このようなCGIプログラムにより、CGIプログラムの動作確認中は、サービス停止フラグをオンに設定しておき、動作確認を行うテスターはWWWブラウザからのリクエストに特定のcookieあるいはクエリー文字列を含めることでCGIプログラムの動作確認を行うことができ、他の利用者はサービスが停止していることを表す表示内容を受信することができるようにする。
【0009】
【発明の実施の形態】
図を参照して本発明の一実施例について説明する。
【0010】
図1は、本実施例のWWWサーバとWWWブラウザの構成を示すブロック図である。図1の101はWWWサーバである。102はサービスを提供するCGIプログラムであり、WWWサーバ上で動作する。103はWWWサーバ101とクライアントコンピュータ104とをつなぐネットワークケーブルであり、実際はインターネットなどになる。105はクライアントコンピュータ上で動作するWWWブラウザである。
【0011】
図2は、サービス停止フラグの設定ページ例である。サービス停止フラグは、CGIプログラムが利用するメモリあるいは記憶装置上に保持しておくことができる。サービス停止フラグの設定は、例えばCGIプログラムがWWWブラウザに図2のようなページを送信し、設定者がWWWブラウザでサービス停止フラグの状態を指定し、CGIプログラムが指定されたサービス停止フラグの状態をメモリあるいは記憶装置上に保持しておくことによって行える。
【0012】
図3、図4および図5は、WWWブラウザからWWWサーバに送信されるリクエスト例である。WWWブラウザからWWWサーバに送信されるリクエストが動作確認用のリクエストかどうかを調べる方法は、リクエスト中に特定のcookieが含まれているかによって行える。例えば特定のcookieがtestMode=ONのとき、図3のリクエストはcookieが含まれていないので動作確認用のリクエストではなく、図4のリクエストはtestMode=ONというcookieが含まれているため、動作確認用のリクエストとなる。動作確認用のリクエストかどうかを調べる方法として、リクエスト中に特定のクエリー文字列が含まれているかによって行うこともできる。例えば特定のクエリー文字列がtestMode=ONのとき、図3のリクエストはクエリー文字列が含まれていないので動作確認用のリクエストではなく、図5のリクエストはtestMode=ONというクエリー文字列が含まれているため、動作確認用のリクエストとなる。本発明においてリクエストには任意のURL、クエリー文字列、cookieが使用できる。動作確認用のリクエストは、それらのリクエストに特定のcookieあるいはクエリー文字列を追加することで生成でき、その結果サービスの任意のページで動作確認を行うことができる。
【0013】
次に、WWWサーバがWWWブラウザからのリクエストに対して表示内容を送信する仕組みについて図6のフローチャートで示す。
【0014】
601でサービス停止フラグを調べる。サービス停止フラグがオフに設定されている場合は、602でサービス動作時のページをWWWブラウザに送信する。サービス動作時のページは、例えば図7のようになる。サービス停止フラグがオンに設定されているときは、603でリクエストが動作確認用のリクエストかどうかを調べる。動作確認用のリクエストの場合は、604でサービス動作時のページをWWWブラウザに送信する。動作確認用のリクエストでない場合は、605でサービス停止時のページをWWWブラウザに送信する。サービス停止時のページは、例えば図8のようになる。
【0015】
【発明の効果】
これにより、WWWサーバ上で動作するCGIプログラムによって提供されるサービスについて、動作確認を行うテスターにはサービス動作中のページを送信し、他の利用者にはサービス停止中のページを送信することができ、テスター以外の利用者にはサービスを利用できない状態でサービスの動作確認を行うことができるようになる。
【図面の簡単な説明】
【図1】このWWWサーバの構成図。
【図2】サービス停止フラグの設定ページ例。
【図3】通常のリクエスト例。
【図4】cookieを使用して動作確認をするときのリクエスト例。
【図5】クエリー文字列を使用して動作確認をするときのリクエスト例。
【図6】WWWサーバがWWWブラウザに送信する表示内容を決定する処理の流れ図。
【図7】サービス動作時のページ例。
【図8】サービス停止時のページ例。
【符号の説明】
101 WWWサーバ
102 CGIプログラム
103 ネットワーク回線
104 クライアントコンピュータ
105 WWWブラウザ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a WWW server that can transmit display content indicating that a service is stopped to a WWW browser.
[0002]
[Prior art]
Various services can be operated on a WWW server and used from a WWW browser. For example, it is an online shopping service using an Internet line (for example, refer to non-patent literature).
[0003]
A service that operates on the WWW server is usually implemented as a CGI program and operates on the WWW server. Such a CGI program may be updated for function expansion, failure correction, or the like. Furthermore, after updating the CGI program, it may be confirmed that the updated CGI is operating normally.
[0004]
[Non-patent literature]
Rakuten Service General Catalog October-December 2002 Rakuten Handbook, Rakuten, Inc., p. 6
[0005]
[Problems to be solved by the invention]
During the operation check of the updated CGI program, only the tester who performs the operation check can access the service provided by the CGI program, and other users do not want to access the service. Conventionally, it is displayed that the service cannot be used on the page where the link to the service is provided, the link to the service is deleted, or the user is informed that the service cannot be used while checking the operation of the CGI program. There was a need to do.
[0006]
However, these methods have a problem that a user who directly accesses a URL in the service can use the service.
[0007]
[Means for Solving the Problems]
In the present invention, a service stop flag can be set in a CGI program that provides a service. When a request for a service is received from a WWW browser, the service is stopped if the service stop flag is set to ON. When the display content indicating that the service stop flag is set to OFF, a normal service is provided. However, when the service stop flag is set to ON and a specific cookie or query character string is included in the request from the WWW browser, a normal service is provided.
[0008]
With such a CGI program, while the operation of the CGI program is being confirmed, the service stop flag is set to ON, and the tester that confirms the operation includes a specific cookie or query string in the request from the WWW browser. The operation of the program can be confirmed, and other users can receive display contents indicating that the service is stopped.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to the drawings.
[0010]
FIG. 1 is a block diagram illustrating a configuration of a WWW server and a WWW browser according to the present embodiment. Reference numeral 101 in FIG. 1 denotes a WWW server. Reference numeral 102 denotes a CGI program that provides a service, and operates on a WWW server. Reference numeral 103 denotes a network cable that connects the WWW server 101 and the client computer 104, which is actually the Internet or the like. Reference numeral 105 denotes a WWW browser operating on the client computer.
[0011]
FIG. 2 is an example of a service stop flag setting page. The service stop flag can be held on a memory or a storage device used by the CGI program. For example, the CGI program sends a page as shown in FIG. 2 to the WWW browser, the setter specifies the service stop flag state in the WWW browser, and the service stop flag state in which the CGI program is specified. Can be stored in a memory or a storage device.
[0012]
FIG. 3, FIG. 4 and FIG. 5 are examples of requests transmitted from the WWW browser to the WWW server. A method for checking whether or not the request transmitted from the WWW browser to the WWW server is an operation confirmation request can be performed depending on whether a specific cookie is included in the request. For example, when a specific cookie is testMode = ON, the request in FIG. 3 does not include the cookie, so the request in FIG. 4 is not a request for operation check. It becomes a request for. As a method of checking whether or not the request is for an operation check, it can be performed depending on whether a specific query string is included in the request. For example, when a specific query character string is testMode = ON, the request in FIG. 3 does not include a query character string, so the request in FIG. 5 includes a query character string of testMode = ON. Therefore, it becomes a request for operation confirmation. In the present invention, an arbitrary URL, query character string, and cookie can be used for the request. The operation confirmation request can be generated by adding a specific cookie or query character string to the request, and as a result, the operation confirmation can be performed on an arbitrary page of the service.
[0013]
Next, a mechanism in which the WWW server transmits display contents in response to a request from the WWW browser is shown in the flowchart of FIG.
[0014]
In step 601, the service stop flag is checked. If the service stop flag is set to OFF, a page during service operation is transmitted to the WWW browser in 602. The page at the time of service operation is, for example, as shown in FIG. If the service stop flag is set to ON, it is checked at 603 whether the request is an operation confirmation request. In the case of an operation confirmation request, the page at the time of service operation is transmitted to the WWW browser at 604. If the request is not an operation confirmation request, the service stop page is transmitted to the WWW browser in 605. For example, the page when the service is stopped is as shown in FIG.
[0015]
【The invention's effect】
As a result, for a service provided by a CGI program operating on the WWW server, a page indicating that the service is operating may be transmitted to a tester for confirming the operation, and a page indicating that the service is stopped may be transmitted to other users. It is possible to check the operation of the service without using the service for users other than the tester.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of this WWW server.
FIG. 2 is a setting page example of a service stop flag.
FIG. 3 shows a normal request example.
FIG. 4 is a request example when an operation check is performed using a cookie.
FIG. 5 shows an example of a request for checking operation using a query character string.
FIG. 6 is a flowchart of processing for determining display contents to be transmitted from a WWW server to a WWW browser.
FIG. 7 shows an example of a page during service operation.
FIG. 8 shows an example of a page when a service is stopped.
[Explanation of symbols]
101 WWW server 102 CGI program 103 Network line 104 Client computer 105 WWW browser