ðŸ Archived View for geminiprotocol.net ⺠docs ⺠ja ⺠tech-overview.gmi captured on 2024-07-08 at 23:58:57. Gemini links have been rewritten to link to archived content
â¡ïž Next capture (2024-08-18)
-=-=-=-=-=-=-
æ¬ææžã¯å®å šãªãGeminiæè¡ã¹ã¿ãã¯ããã€ãŸããããã¯ãŒã¯èŒžéãããã³ã«ãšãgemtextãããŒã¯ã¢ãã圢åŒã®äž¡æ¹ã®ã©ãã¹ã±ãããæäŸããŸããã¹ã±ããã¯äžæ£ç¢ºã§ãããšããæå³ã§ã®ãã©ããã§ã¯ãªããåã«Geminiã®å šãŠã®é¢ãå®å šã«è©³çŽ°ã«ç€ºããŠããªããšããæå³ã§ãããããžã§ã¯ãGeminiã®FAQã«ãããããæ°Žé¢äžã§ã®Geminiã®ä»çµã¿ã«ã€ããŠãã£ãšè©³ããæ å ±ãæäŸããŠããŸãããåãããŠããæ£åŒãªä»æ§ã»ã©ã«ã¯è©³ãããããŸãããæè¡çã«æŽç·Žãããèªã¿æã®å¥œå¥å¿ãæºè¶³ãããã«ã¯å åã§ãããããŸããšããžã±ãŒã¹ãå¿çšã¢ããªã±ãŒã·ã§ã³ãæãã«ããã°ãããªãã«ããŸãåããœãããŠã§ã¢ãææ©ãå®è£ ããããšãã§ããŸããããã¯èŠç¯çãªææžã§ã¯ãããŸãããããã«æžãããŠããããšãš2ã€ã®æ£åŒãªä»æ§ã®äœãããšççŸãããšãã¯æ£åŒãªä»æ§ãåªè¶ããŸãã
ãããžã§ã¯ãGeminiã®FAQ
Geminiã®ãããã¯ãŒã¯ã®ãããã³ã«ã®ä»æ§
Geminiãã€ããŒããã¹ã圢åŒïŒãgemtextãïŒã®ä»æ§
Geminiã¯èŠæ±å¿çåãã©ã³ã¶ã¯ã·ã§ã³ã«ç¹åããã¯ã©ã€ã¢ã³ããµãŒããŒæç¶ãã§ãã倧ãŸãã«ã¯gopherãHTTPã«äŒŒãŠããŸããæ¥ç¶ã¯åäžã®ãã©ã³ã¶ã¯ã·ã§ã³ã®äžæ¹ã§éããåå©çšã§ããŸãããGeminiãTCP/IPäžã§ãµãŒããŒããäžãããããšãããµãŒããŒã¯ããŒã1965ïŒæåã®æ人Geminiããã·ã§ã³ã§ããGemini3ã®å¹Žã§ããã'65幎3æã«é£è¡ããŸããïŒã§åŸ ã¡åããŸããããã¯éç¹æš©çãªããŒãã§ããããããäœè ã§ããªããå©çšè ãšããŠãµãŒããŒãèµ°ãããããšã¯ãšãŠãç°¡åã§ããäŸãã°ãããšããµãŒããŒãGoã§æžãããŠããããã®ããã«äŒçµ±çãªããæ¹ã§æš©éãæœããªããšããŠãã§ãã
Geminiã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ã¯1çš®é¡ããã倧ãŸãã«gopherèŠæ±ãHTTPãGETãèŠæ±ãšç䟡ã§ãããã©ã³ã¶ã¯ã·ã§ã³ã¯ä»¥äžã®ããã«çºçããŸãã
C: æ¥ç¶ãéã
S: æ¥ç¶ãåãä»ãã
C/S: TLSãã³ãã·ã§ã€ã¯ãå®äºïŒ4ç¯åç §ïŒ
C: ãµãŒããŒèšŒææžãæ€èšŒïŒ4.2ãåç §ïŒ
C: èŠæ±ãéä¿¡ïŒCRLFã§çµç«¯ãã1è¡ïŒïŒ2ç¯ãåç §ïŒ
S: å¿çããããéä¿¡ïŒCRLFã§çµç«¯ãã1è¡ïŒãæåã§ãªãç¶æ äžã§ã¯æ¥ç¶ãéããïŒ3.1ãš3.2ãåç §ïŒ
S: å¿çæ¬äœãéä¿¡ïŒããã¹ããªãããã€ããªããŒã¿ïŒïŒ3.3åç §ïŒ
S: æ¥ç¶ãéããïŒTLSã®close_notifyãå«ãã4ç¯åç §ïŒ
C: å¿çãåŠçïŒ3.4åç §ïŒ
ãªããã¯ã©ã€ã¢ã³ãã¯ãµãŒããŒãå¿çåŠçãéå§ããããã«æ¥ç¶ãéãããŸã§åŸ æ©ãã矩åã¯ãããŸãããäžèšã§ã¯ç°¡åãã»æå¿«ãã®ããã«ãã®ããã«ç€ºãããŠãããå žåçãªç¶æ³äžã§æ¥ç¶ãéãã責任ã¯ãµãŒããŒåŽã«ããããšãæ¥ç¶ã¯å¿çæ¬æã®å®äºåŸçŽã¡ã«éããããã¹ãã§ããããšã匷調ããŠãããŸãã
Geminiãä»ããŠãã¹ããããè³æºã¯ã¹ããŒã ãgeminiããæã€URIã䜿ã£ãŠæå®ãããŸãããã®ã¹ããŒã ã¯RFC 3986ã§å®çŸ©ãããäžè¬çãªURIã®æ§æãšæ§æäžäºææ§ããããŸãããäžè¬çãªæ§æã®å šãŠã®èŠçŽ ã«ã¯å¯Ÿå¿ããŠããŸãããç¹ã«ãæš©éçãªèŠçŽ ãèš±å¯ãããŠããèŠä»¶ã«ããªã£ãŠããŸããããã®å©çšè æ å ±ã®éšåèŠçŽ ã¯èš±å¯ãããŠããŸããããã¹ãã®éšåèŠçŽ ã¯å¿ é ã§ããããŒãã®éšåèŠçŽ ã¯çç¥å¯èœã§ãããæ¢å®å€ã¯1965ã§ãããã¹ãã¯ãšãªããã©ã°ã¡ã³ãã®èŠçŽ ã¯èš±å¯ãããŠãããäžè¬çãªæ§æã«ããå®çŸ©ãããŠããç¯å²ãè¶ããç¹å¥ãªæå³ãæã¡ãŸããã空ã®ãã¹ã¯ã/ãããã®ã¿æ§æããããã¹ãšç䟡ã§ãããã¹äžã®ç©ºçœã¯+ã§ã¯ãªã%20ã§ç¬Šå·åãããã¹ãã§ãã
ã¯ã©ã€ã¢ã³ãã¯èŠæ±ãéãåã«ïŒRFC 3986ã«ããïŒURIãæ£èŠåãã¹ãã§ãããµãŒããŒã¯èŠæ±ãåŠçããåã«åãåã£ãURIãæ£èŠåãã¹ãã§ãã
Geminiã®èŠæ±ã¯CRLFã§çµç«¯ãã以äžã®æ§é ãæã€åäžã®è¡ã§ãã
<URL><CR><LF>
<URL>ã¯ã¹ããŒã ãå«ããŠUTF-8ã§ç¬Šå·åããã絶察URLã§ãããæ倧é·ã1024ãã€ãã§ããèŠæ±ã¯U+FEFFãã€ãé åºå°ããå§ãŸã£ãŠã¯ãªããŸããã
絶察URLã®ä»£ããã«ãã¹ãã»ã¯ã¿ã®ã¿ãéãããšã¯HTTPã®ãHostãããããæ§ç¯ããããšãšç䟡ãªå¹æããããŸããåãIPã¢ãã¬ã¹ã«è€æ°ã®Geminiãã¡ã€ã³ã®ä»®æ³ãã¹ããããããšãèš±ããŸãããŸããä»»æã§ãããã·ãšããŠæ©èœããããšãèš±å¯ãããŸãããgeminiã以å€ã®ã¹ããŒã ã®èŠæ±ãå«ããããšã§ããµãŒããŒãä»»æã§ãããã³ã«ã翻蚳ããé¢éãšããŠæ©èœããããšãèš±å¯ããŸããäŸãã°Geminiäžã§gopherè³æºãååŸãããªã©ã§ãããããã·ã¯ä»»æã§ããã倧å€æ°ã®ãµãŒããŒã¯ããããã®ãã¡ã€ã³ã®è³æºã®èŠæ±ã«ã®ã¿å¿çããããšãæåŸ ãããŸãã
ã¯ã©ã€ã¢ã³ãã¯èŠæ±äžã®æåã®<CR><LF>ã®åºçŸä»¥éã«äœããéã£ãŠã¯ãªããŸããããŸããµãŒããŒã¯æåã®<CR><LF>ã®æåã®åºçŸä»¥éã«éããããã®ã¯äœã§ããç¡èŠããªããã°ãªããŸããã
Geminiã®å¿çã¯åäžã®CRLFã§çµç«¯ããåäžã®ãããè¡ãšãä»»æã§ç¶ãå¿çæ¬æãããªããŸãã
Geminiã®å¿çãããã¯ä»¥äžã®ãããªåœ¢åŒã§ãã
<ç¶æ ><空çœ><ã¡ã¿æ å ±><CR><LF>
<ç¶æ >ã¯2æ¡ã®æ°å€ã®ç¶æ ã³ãŒãã§ããã3.2ãšè£éº1ã«åŸè¿°ããéãã§ãã
<空çœ>ã¯åäžã®ç©ºçœæåã§ããã€ãŸããã€ã0x20ã§ãã
<ã¡ã¿æ å ±>ã¯UTF-8ã§ç¬Šå·åãããæ倧é·1024ãã€ãã®æååã§ãããã®æå³ã¯<ç¶æ >ã«äŸåããŸãã
å šäœã®å¿çããããšéšåæååãšããŠã®<ã¡ã¿æ å ±>ã¯U+FEFFãã€ãé åºå°ã§å§ãŸã£ãŠã¯ãªããŸããã
<ç¶æ >ããæåãã®ã³ãŒãã®ç¯å²ã«å±ããŠããªãå ŽåããµãŒããŒã¯ããããéã£ãåŸã«æ¥ç¶ãéããªããã°ãªããŸããããŸãå¿çæ¬æãéã£ãŠã¯ãªããŸããã
ãµãŒããŒã2æ¡ã®æ°åã§ãªã<ç¶æ >ãé·ãã1024ãã€ããè¶ãã<ã¡ã¿æ å ±>ãéãå Žåãã¯ã©ã€ã¢ã³ãã¯æ¥ç¶ãéããŠå¿çããããç¡èŠããå©çšè ã«ãšã©ãŒãç¥ãããã¹ãã§ãã
Geminiã¯2æ¡ã®æ°å€ã®ç¶æ ã³ãŒãã䜿ããŸããé¢é£ããç¶æ ã³ãŒãã¯æåã®æ¡ã§åãå€ãå ±æããŸããéèŠãªããšãšããŠãGeminiã®ç¶æ ã³ãŒãã®æåã®æ¡ã¯HTTPã«ãããããªãã¯ã©ã€ã¢ã³ããšã©ãŒããããµãŒããŒãšã©ãŒãã®ãããªææ§ãªåé¡ã«ã³ãŒããéåã§åããŠã¯ããŸããããã®ä»£ãããæåã®æ¡ã ãã§ã¯ã©ã€ã¢ã³ããã©ã®ããã«å¿çãæ±ãã°ããããå€å®ããã«å åãªæ å ±ãæäŸããŸããèšèšäžã§ã¯ãæåã®æ¡ãèŠãã ãã§åçŽã§ããå®å šãªæ©èœãæã€ã¯ã©ã€ã¢ã³ããæžãããšãå¯èœãšãªã£ãŠããŸãã2ã€ç®ã®æ¡ã§ã¯ãã詳现ãªæ å ±ãæäŸãããŠããŸããææ§ãã®ãªããµãŒããŒã®ãã°èšé²ã®ããã§ãããã¡ãã£ãšã°ããèœççãªå©çšè ã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããç°¡åã§å¯Ÿè©±çãªã¯ã©ã€ã¢ã³ããæžãããšãã§ããŸãããŸãå 容åéåšãæ€çŽ¢ãšã³ãžã³ã¯ããŒã©ãªã©ã®ãããªãã匷åºã§è³¢ãèªåçãªã¯ã©ã€ã¢ã³ããæžãããšãã§ããŸãã
å¿çã³ãŒãã®æåã®æ¡ã¯ææ§ããªãå¿çã6ã€ã®åé¡ã«ä»åããŸãããã®åé¡ã¯<ã¡ã¿æ å ±>è¡ã®æå³è«ãå®çŸ©ããŸãã
1ããå§ãŸãç¶æ ã³ãŒãã¯INPUTç¶æ ã³ãŒãã§ãããã®æå³ã¯æ¬¡ã®éãã§ãã
èŠæ±ãããè³æºã¯ããã¹ãã®å©çšè ã®å ¥åãåãä»ããŸãã<META>è¡ã¯å©çšè ã«è¡šç€ºãããã¹ã質åå 容ã§ããããããåãåããèŠçŽ ãå«ãå©çšè ã®å ¥åãšå ±ã«åã³åãè³æºãèŠæ±ãã¹ãã§ããèŠæ±ã«å«ãŸããåãåããã¯RFC3986ã§ã®éåžžã®äžè¬çãªURLã«æ²¿ããã®ã§ããã€ãŸã?ã§ãã¹ãšåºå¥ãããŸããå©çšè ã®å ¥åäžã®äºçŽæåã¯RFC2986ã«ãããããŒã»ã³ãæåã§ç¬Šå·åããããªããã°ãªããŸããããŸã空çœæåããŸãããŒã»ã³ãæåã§ç¬Šå·åãã¹ãã§ãã
2ããå§ãŸãç¶æ ã³ãŒãã¯SUCCESSç¶æ ã³ãŒãã§ãããã®æå³ã¯ä»¥äžã®éãã§ãã
å¿çã¯é©åã«åŠçãããå¿çæ¬æãå¿çãããã®åŸã«æ¥ãŸãã<ã¡ã¿æ å ±>è¡ã¯MIMEã¡ãã£ã¢çš®å¥ã§ããå¿çæ¬æã«é©çšãããŸãã
3ã§å§ãŸãç¶æ ã³ãŒãã¯REDIRECTç¶æ ã³ãŒãã§ãããã®æå³ã¯æ¬¡ã®éãã§ãã
ãµãŒããŒã¯ã¯ã©ã€ã¢ã³ããèŠæ±ãããè³æºã®ããæ°ããå Žæã«ãªãã€ã¬ã¯ãããŸããå¿çæ¬æã¯ãããŸããã<META>ã¯èŠæ±ãããè³æºã®ããæ°ããURLã§ããURLã¯çµ¶å¯Ÿçãªããçžå¯Ÿçãªãã®ã§ããçžå¯Ÿçã§ããã°å ã®èŠæ±ã§äœ¿ã£ãURLã«å¯ŸããŠè§£æ±ºãããŸããå ã®èŠæ±ã§äœ¿ãããŠããURLã«ã¯ãšãªæååãå«ãŸããŠããå Žåãã¯ã©ã€ã¢ã³ãã¯ãã®æååããªãã€ã¬ã¯ãã®URLã«é©çšããŠã¯ãªããããªãã€ã¬ã¯ãã®URLãããã®ãŸãŸã䜿ããªããã°ãªããŸããããªãã€ã¬ã¯ãã¯äžæçãªãã®ãšèŠåãããã¹ãã§ããã€ãŸãã¯ã©ã€ã¢ã³ãã¯è³æºãå ã®ã¢ãã¬ã¹ã§èŠæ±ãç¶ããã¹ãã§ãããèªåçã«ããã¯ããŒã¯ãæŽæ°ãããããªäŸ¿å®ãã¯ããããã¹ãã§ã¯ãããŸãããå¿çæ¬æã¯ãããŸããã
4ããå§ãŸãç¶æ ã³ãŒãã¯TEMPORARY FAILUREç¶æ ã³ãŒãã§ãããã®æå³ã¯ä»¥äžã®éãã§ãã
èŠæ±ã倱æããŸãããå¿çæ¬æã¯ãããŸããã倱æã®æ§è³ªã¯äžæçãªãã®ã§ããã€ãŸãå°æ¥çã«åäžã®èŠæ±ã¯æåããå¯èœæ§ããããŸãã<ã¡ã¿æ å ±>ã®å 容ã§å€±æã®è¿œå æ å ±ãæäŸããŠæ§ããŸããããããã¯äººéã®å©çšè ã«è¡šç€ºãã¹ãã§ãã
5ããå§ãŸãç¶æ ã³ãŒãã¯PERMANENT FAILUREç¶æ ã³ãŒãã§ãããã®æå³ã¯ä»¥äžã®éãã§ãã
èŠæ±ã倱æããŸãããå¿çæ¬æã¯ãããŸããã倱æã®æ§è³ªã¯æ°žä¹ ã®ãã®ã§ããã€ãŸãå°æ¥ã«äºã£ãŠåäžã®èŠæ±ã¯åãçç±ã«ãã確å®ã«å€±æããŸãã<ã¡ã¿æ å ±>ã®å 容ã§ã¯å€±æã«ã€ããŠã®è¿œå æ å ±ãæäŸããŠæ§ããŸãããã人éã®å©çšè ã«è¡šç€ºãããã¹ãã§ããåéåšã玢åŒçæã¯ããŒã©ã®ãããªèªåçãªã¯ã©ã€ã¢ã³ãã¯ãã®èŠæ±ãç¹°ãè¿ãã¹ãã§ã¯ãããŸããã
6ããå§ãŸãç¶æ ã³ãŒãã¯CLIENT CERTIFICATE REQUIREDç¶æ ã³ãŒãã§ãããã®æå³ã¯ä»¥äžã®éãã§ãã
èŠæ±ãããè³æºã¯ã¯ã©ã€ã¢ã³ããã¢ã¯ã»ã¹ããéã®èšŒææžãèŠæ±ããŸããèŠæ±ã蚌ææžãªãã«ãããå ŽåãèŠæ±ã¯ãã®1床ã ãã«ãã¹ãã§ããèŠæ±ã蚌ææžä»ãã§ãããå ŽåããµãŒããŒã¯åãä»ããèŠæ±ã¯å¥ã®èšŒææžã§ç¹°ãè¿ãããã¹ãã§ãã<ã¡ã¿æ å ±>ã®å 容ïŒãŸãç¹å®ã®6xã³ãŒãïŒã§èšŒææžã®èŠä»¶ã«ã€ããŠã®è¿œå æ å ±ã蚌ææžãæ絶ãããçç±ãæäŸããŠæ§ããŸããã
ãªãã人éã䜿çšããããã®åºæ¬çãªå¯Ÿè©±çã¯ã©ã€ã¢ã³ãã®ããã®è£è¶³ãšããŠããšã©ãŒ4ãªãã5ã¯ããšã©ãŒãã®èŠåºãã®äžã«<ã¡ã¿æ å ±>ã®å 容ãåã«è¡šç€ºããã ãã§ãå¹æçã«ãããããæ±ãããšãã§ããŸãããšã©ãŒãäžæçãªãã®ãæåžžçãªãã®ããåºå¥ããããšã¯ãäž»ã«èªåçãªã¯ã©ã€ã¢ã³ãã®è¯ãæ¯èãã«é¢ä¿ããŸããåºæ¬çãªã¯ã©ã€ã¢ã³ãã¯ã¯ã©ã€ã¢ã³ã蚌ææžã®èªèšŒã«å¯Ÿå¿ããªãããšãéžãã§ãæ§ããŸããããã®å ŽåãïŒ1ã2ã3ã4ãš5ã®çµã¿åããããå§ãŸãç¶æ ã«å¯ŸããïŒ4ã€ã®ããããã®ç¶æ å¶åŸ¡ã®ä»çµã¿ãå¿ èŠã§ãã
å®å šãª2æ¡ã®ã·ã¹ãã ã¯è£éº1ã§è©³è§£ãããŸãããªãããããã®åŠ¥åœãª6ã€ã®æåã®æ¡ã«ã€ããŠã2æ¡ããŒãã®ã³ãŒãã¯ç¹å¥ãªæå³ã®ãªãçš®é¡ã®äžè¬çãªç¶æ ã«å¯Ÿå¿ããŸããã€ãŸããçºå±çãªæ©èœã®ãªãåºæ¬çãªãµãŒããŒã¯10ã20ã30ã40ã50ã®ã³ãŒããè¿ãããããã°è¯ãã®ã§ãã
Geminiã®ç¶æ ã³ãŒãã·ã¹ãã ã¯æ éã«èšèšãããŠããã2æ¡ç®ã®è¡šçŸåïŒãšããã«äŒŽã£ãŠå¢å€§ããè€éæ§ïŒããµãŒããŒãšã¯ã©ã€ã¢ã³ãã®äž¡æ¹ã«ãšã£ãŠå®å šã«ãä»»æã§æå¹ã«ã§ããããã«ãªãããã«ããŠããŸãã
å¿çæ¬æã¯åãªãçã®å 容ã§ãããgopherããããããã¹ããªãããã€ããªã§ããå§çž®ãæçåãå 容ã転éã®ç¬Šå·åãšãã£ãé¡ã®å¯Ÿå¿ã¯ãããŸããããµãŒããŒã¯æçµãã€ãã®åŸã«æ¥ç¶ãéããgopherã®å€ç«ãããã®ãããªãå¿çæ«å°Ÿãä¿¡å·ã¯ãããŸããã
å¿çæ¬æã¯ããããSUCCESSç¶æ ïŒã€ãŸãç¶æ ã³ãŒãã®æåã®æ¡2ïŒã瀺ããšãã«ã®ã¿ä»å±ãããã®ã§ãããã®ãããªå¿çã«ãããŠã<ã¡ã¿æ å ±>ã¯RFC 2046ã«å®çŸ©ãããMIMEã¡ãã£ã¢çš®å¥ã§ãã
ã€ã³ã¿ãŒãããã¡ãã£ã¢çš®å¥ã¯æ£çµ±ãªåœ¢åŒã§ç»é²ãããŸããGeminiãä»ããŠè»¢éãããå 容ã¯è»¢éã«å ç«ã£ãŠé©åäžã€æ£çµ±ãªåœ¢åŒã§è¡šçŸãããªããã°ãªããŸããããã ã次ã®æ®µèœã§å®çŸ©ãããããã«ãtextãçš®å¥ã¯äŸå€ã§ãã
æ£çµ±ãªåœ¢åŒã«ãããŠããtextãã®ã¡ãã£ã¢å¯çš®å¥ã¯ããã¹ãè¡ã®æ¹è¡ãšããŠCRLFã䜿ããŸããGeminiã¯ãã®èŠä»¶ãç·©åããåã«LFåç¬ã®ããã¹ãã¡ãã£ã¢ã®è»¢éãèš±ããŸãïŒãã ãCRåç¬ã¯èš±ããŸããïŒãããã¯å¿çæ¬æå šäœã§äžè²«æ§ãæã£ãŠæ¹è¡ãããŠããããšãè¡šçŸããŸããGeminiã®ã¯ã©ã€ã¢ã³ãã¯Geminiãä»ããŠåãåã£ãããã¹ãã¡ãã£ã¢äžã®CRLFãšLFãæ¹è¡ã®è¡šçŸãšããŠåãä»ããªããã°ãªããŸããã
MIMEçš®å¥ããtext/ãããå§ãŸã£ãŠããæåéåãæ瀺çã«äžããããŠããªãå Žåãæåéåã¯UTF-8ã§ããããšãä»®å®ãããã¹ãã§ããæºæ ããã¯ã©ã€ã¢ã³ãã¯UTF-8ã§ç¬Šå·åãããtext/*ã®å¿çã«å¯Ÿå¿ããªããã°ãªããŸãããã¯ã©ã€ã¢ã³ãã¯ä»»æã§ä»ã®ç¬Šå·åæ¹åŒã«å¯Ÿå¿ããŠãæ§ããŸãããè€åã§ããªãæåéåã§å¿çãåãåã£ãã¯ã©ã€ã¢ã³ãã¯æååãã衚瀺ãã代ããã«èµ·ãã£ãããšãäžå¯§ã«å©çšè ã«äŒããã¹ãã§ãã
<ã¡ã¿æ å ±>ã空æååã§ããå ŽåãMIMEçš®å¥ã¯æ¢å®ã§ãtext/gemini; charset=utf-8ãã§ãªããã°ãªããŸãããtext/geminiã¡ãã£ã¢çš®å¥ã¯5ç¯ã§å®çŸ©ãããŸãã
ã¯ã©ã€ã¢ã³ãã«ããå¿çã®æ±ãã¯æäŸãããMIMEçš®å¥ã®æ å ±ã«ããå®æœãããã¹ãã§ããGeminiã¯ç¬èªã®MIMEçš®å¥ïŒtext/geminiïŒãå®çŸ©ããŠããããã®æ±ãã«ã€ããŠã¯5ç¯ã§åŸè¿°ãããŸãããã®ä»å šãŠã®å Žåã§ã¯ã©ã€ã¢ã³ãã¯MIMEçš®å¥ã«åºã¥ããŠãäœããã®æå³ã®ãããããšããã¹ãã§ããæå°é䞻矩ã®ã¯ã©ã€ã¢ã³ãã¯æžåŒåããããšãªãᅵᅵᅵé¢ã«gemtext以å€å šéšã®text/*ã®å¿çãåºåããæŠç¥ãæ¡ã£ãŠãæ§ããŸããããããã¹ãå¿çã§ãªããã®ããã£ã¹ã¯ã«ä¿åãããšããã®ãè¯ãã§ããããunixã·ã¹ãã åãã®ã¯ã©ã€ã¢ã³ãã¯ãããã¹ãã§ãªãçš®å¥ã®æ±ãã«ã€ããŠã/etc/mailcapã«ã€ã³ã¹ããŒã«ãããããã°ã©ã ãããããšè¯ãã§ãããã
Geminiã®ãã©ã³ã¶ã¯ã·ã§ã³ã«TLSã䜿çšããããšã¯å¿ é ã§ãã
TSLãžã®ãµãŒããŒå衚瀺 (Server Name Indication; SNI) ã®ä»æ§ãå¿ é ã§ããããã«ããååã«ããä»®æ³ãã¹ãã掻çšã§ããŸãã
RFC 5246åã³8446ã«ãããGeminiã®ãµãŒããŒã¯å®å šãªå¿çãéã£ãåŸã«æ¥ç¶ãéããã®ã«å ç«ã¡TLSã®`close_notify`ãéããªããã°ãªããŸãããããã¯ãããã¯ãŒã¯ã®ãšã©ãŒãæ»æã«ããäžå®å šã«éããå¿çãšå®éããå¿çãåºå¥ããããã«å¿ é ã§ãã
ãµãŒããŒã¯TLSããŒãžã§ã³1.2以äžã䜿ããªããã°ãªããŸããããŸãTLSããŒãžã§ã³1.3以äžã䜿ãã¹ãã§ããTLS 1.2ã¯ãå©çšã§ããå®è£ ã©ã€ãã©ãªã®ç¯å²ãåçã«æžãããŠããŸãããšãé¿ããããã«åœé¢ã®éãæ°ã¯é²ãŸãªããã®ã®èš±å¯ãããŠããŸããè¿ãå°æ¥ãTLS 1.3以äžã䜿ãä»æ§ã«ã§ããããšãæãã§ããŸããæ代ãå åãããã¯ã©ã€ã¢ã³ãã¯TLSããŒãžã§ã³ä»¥äžã䜿ããµãŒããŒãžã®æ¥ç¶ãæ絶ããŠãæ§ããŸããã
ã¯ã©ã€ã¢ã³ãã¯TLSæ¥ç¶ã奜ããªã ãæ€èšŒããŠè¯ãïŒå šãããªããŠãè¯ãïŒã§ããã匷ãæšå¥šãããããæ¹ã¯ã軜éãªãTOFUã蚌ææžãã³çãã·ã¹ãã ãå®è£ ããããšã§ããããã¯èªå·±èšŒæ蚌ææžã第äžçŽåžæ°ãšããŠæ±ããã®ã§ããããã«ãããããã¯ãŒã¯äžã®äœèšãªè² æ ãå€§å¹ ã«æžãïŒèšŒææžãéãããã ãã§ãããéå šäœã§ãªããŠè¯ããªããŸãïŒãGeminiã®ãµã€ããèšå®ããæ·å± ãäœããªããŸãïŒCAã«æ¯æãããããLet's Encryptã®cronãžã§ããèšå®ãããããããšãªãã蚌ææžãäœã£ãŠå®è¡ããã ãã«ãªããŸãïŒã
TOFUã¯ãTrust On First Useãããåã£ãŠãããOpenSSHã§äœ¿ãããå ¬ééµã»ãã¥ãªãã£ã¢ãã«ã«äŒŒããã®ã§ããæåã«Geminiã¯ã©ã€ã¢ã³ãããµãŒããŒã«æ¥ç¶ãããšããäœã§ããæ瀺ããã蚌ææžãåãä»ããŸãããã®èšŒææžã®æçŽãšæéæ¥ã¯ïŒSSHã®.known_hostsãã¡ã€ã«ãšåæ§ã«ïŒæ°žç¶çãªããŒã¿ããŒã¹ã«ä¿åããããµãŒããŒã®ãã¹ãåãšããŒãçªå·ã«çŽä»ããŸãã以éã¯åããã¹ãåãšåãããŒãçªå·ãžã®æ¥ç¶ã§ã¯ãåãåã£ã蚌ææžã®æçŽãèšç®ããããŒã¿ããŒã¹äžã®ãã®ãšæ¯èŒãããŸãããã蚌ææžã以åã«åãåã£ãŠãããã以åã®èšŒææžã®æéæ¥ãéããŠããªããã°ãå©çšè ã«ã¯èŠåã衚瀺ãããŸããããã¯webãã©ãŠã¶ã®å©çšè ãä¿¡é Œã§ããCAã«è³ã眲åéã®ãªã蚌ææžãåãåã£ããšãã®è¡šç€ºãšäŒŒããã®ã§ãã
ãã®ã¢ãã«ã¯å®å šãšã¯èšãé£ããã®ã§ãããèªå·±èšŒæ蚌ææžãåã«ç¡æ¡ä»¶ã«åãä»ããããã¯ã²ã©ãã¯ãªãããã£ãšãã·ã§ãã
webã§ã¯æ» å€ã«èŠãŸããããTLSã§ã¯ã¯ã©ã€ã¢ã³ãã蚌ææžã䜿ã£ãŠãµãŒããŒã«èªå·±ã蚌æããããšãã§ããŸããã¡ããã©ãµãŒããŒãäŒçµ±çã«èªèº«ãã¯ã©ã€ã¢ã³ãã«èšŒæããã®ãšåãããæ¹ã§ããGeminiã«ã¯ãµãŒããŒã«åãä»ããæ¹åã®èŠæ±ãããæ©èœãå«ãŸããŠãããã¯ã©ã€ã¢ã³ãã¯ã¯ã©ã€ã¢ã³ãã®èšŒææžä»ãã®èŠæ±ãç¹°ãè¿ããŸããããã¯å€§å€æè»ã§ãããããªãã»ãã¥ã¢ãªã®ã§ããã幟ã€ãã®å¿çšäŸã§ã¯ã©ã€ã¢ã³ãã®åå®ã«ã€ããŠãšãŠãåçŽãªæ°ä»ãããããŸãã
Geminiã®èŠæ±ã¯å žåçã«ã¯ã¯ã©ã€ã¢ã³ã蚌ææžãªãã§è¡ãããŸããããèŠæ±ãããè³æºã«ã¯ã©ã€ã¢ã³ã蚌ææžãå¿ èŠã§ãèŠæ±ã«å«ãŸããŠããªããã°ããµãŒããŒã¯ç¶æ ã³ãŒã60ã61ã62ã§å¿çã§ããŸãïŒè£éº1ã®ã¯ã©ã€ã¢ã³ã蚌ææžã«é¢ä¿ããå šãŠã®ç¶æ ã³ãŒãã®èª¬æãåç §ïŒããããã®ç¶æ ã³ãŒãã«å¯Ÿããå¿çã§çæããããèªã¿èŸŒãŸãããããã¯ã©ã€ã¢ã³ã蚌ææžã¯ãèŠæ±ããURLãšåããã¹ãåãšããŒãçªå·ã«çŽä»ãã¹ã³ãŒããšèŠæ±ããURLã®ãã¹ã®é äžã«ããå šãŠã®ãã¹ãåãæã¡ãŸããäŸãã°gemini://example.com/fooãç¶æ 60ãè¿ããå©çšè ãæ°ããã¯ã©ã€ã¢ã³ã蚌ææžãçæããŠããã«å¿çããããšãéžãã å Žåããã®åã蚌ææžã以éã®gemini://example.com/fooãgemini://example.com/foo/barãgemini://example.com/foo/bar/bazçã ãžã®èŠæ±ã§äœ¿ãããå©çšè ã蚌ææžãåé€ãããšæ±ºãããäžæçã«é掻æ§ã«ããããããšããŸã§ç¶ããŸãã人éã®å©çšè ã®ããã®å¯Ÿè©±çãªã¯ã©ã€ã¢ã³ãã«ã€ããŠã¯ããã®ãããªåäœãç°¡åã«ã§ããããã«ããããŠã¯ã©ã€ã¢ã³ã蚌ææžã®äœ¿çšã«é¢ããŠå©çšè ã«å æ¬çã«å®å šãªå¶åŸ¡ãäžããããã«åŒ·ããå§ãããŸãã
HTMLãHTTPã®ãç¬èªã®ãå¿ç圢åŒã§ãããçŽ ã®ããã¹ããgopherã®ç¬èªã®å¿ç圢åŒã§ããã®ãšåãæå³ã§ãGeminiã¯ç¬èªã®å¿ç圢åŒãå®çŸ©ããŠããŸãããã ããã¡ãããå¿çãããã«MIMEçš®å¥ãå«ããŠãããããã§ãGeminiã¯çŽ ã®ããã¹ãããªããããã¹ããHTMLãMarkdownãLaTeXãªã©ããµãŒããŒããéãããšãã§ããŸãã
çš®å¥ãtext/geminiãã®å¿çæ¬æã¯è»œéãã€ããŒããã¹ã圢åŒã®äžçš®ã§ãããgophermapsãšMarkdownããçæ³ãåŸãŠããŸãããã®åœ¢åŒã§ã¯Gopherã®çŽ ã®ããã¹ãããè±ããªè¡šç€ºäžã®å¯èœæ§ãèš±ããŠããŸãããéåžžã«è§£æãç°¡åã§ããããšã¯ä¿ãããŠããŸãã圢åŒã¯è¡æåã§ãããåè¡ãç¬ç«ããŠåŠçããææžãäžåºŠã ãéãã€ã€å瀺ãæºè¶³ã«è¡ããŸããgopherã«åŸãããªã³ã¯ã¯1è¡æ¯ã«ã®ã¿è¡šç€ºã§ããæŽã£ãŠããç®æ¡æžã®ãããªæ§é ãæšé²ããŸãã
åçŽãªã¯ã©ã€ã¢ã³ãã2æ¡ç®ãç¡èŠããŠãæ£ããæ©èœããããã«Geminiã®2æ¡ã®ç¶æ ã³ãŒããèšèšãããŠããã®ãšäŒŒãŠãããtext/gemini圢åŒã¯åçŽãªã¯ã©ã€ã¢ã³ããçºå±çãªæ©èœãç¡èŠããŠããšãŠãæçšã§ããããšã¯å€ãããªãããã«èšèšãããŠããŸãã
ãtextãæäžäœã¡ãã£ã¢çš®å¥ã®å¯çš®å¥ã§ãããtext/geminiãã¯ãRFC2046ã«å®çŸ©ãããŠãããcharsetãåŒæ°ãç¶æ¿ããŸããããããªãããGeminiãä»ããŠè»¢éããããtextãå 容ã®ãcharsetãã®æ¢å®å€ã¯ãUTF-8ãã§ãã
ãtext/geminiãå¯çš®å¥ã§åå¥ã«å®çŸ©ãããŠããè¿œå ã®åŒæ°ã1ã€ãããŸããããã¯ãlangãåŒæ°ã§ãããlangãã®å€ã¯ãtext/geminiãææžã®ããã¹ãå 容ãæžãããŠããèªç¶èšèªã瀺ããã®ã§ãããlangãåŒæ°ã®ååšã¯çç¥ã§ããŸãããlangãåŒæ°ããããšãããã®è§£éã¯å®å šã«ã¯ã©ã€ã¢ã³ãã§å®çŸ©ãããŸããäŸãã°ãããã¹ãé³å£°åæã®æè¡ã䜿ã£ãŠGeminiã§è¡šãããå 容ãç®ã®äžèªç±ãªå©çšè ã«ãšã£ãŠã¢ã¯ã»ã·ããªãã£ã®ãããã®ã«ããã¯ã©ã€ã¢ã³ãã¯ããlangãå€ã䜿ã£ãŠå 容ã®çºé³ãåäžããŠãè¯ãã§ããããããã¹ããç»é¢ã«å瀺ããã¯ã©ã€ã¢ã³ãã¯ãlangãå€ã䜿ã£ãŠããã¹ãã巊暪æžããšå³æšªæžãã®ã©ã¡ãã§è¡šç€ºãã¹ãããå€å®ããŠãè¯ãã§ãããã巊暪æžãã§æžãããèšèªã ããèªãå©çšè çšã®åçŽãªã¯ã©ã€ã¢ã³ãã§ã¯ãåã«ãlangãå€ãç¡èŠããã°è¯ãã§ãããããlangãåŒæ°ãç¡ãå Žåãäœãã®æ¢å®å€ãä»®å®ããããïŒããã¹ãåæé³å£°ã®ç»é¢èªã¿äžãåšãšãã£ãïŒå 容ãåŠçããããã®èšèªã®æ±ºå®ãå¿ èŠãªã¯ã©ã€ã¢ã³ãã¯ããlangãåŒæ°ãæ¬ èœããŠããå Žåã«ã©ã®ããã«åŠçãç¶ããã°è¯ãã決å®ããããã®å©çšè ã®å ¥åã«äŸåãã¹ãã§ãã
ãlangãåŒæ°ã®åŠ¥åœãªå€ã¯BCP47ã«å®çŸ©ããã1ã€ä»¥äžã®èšèªã¿ã°ã®ã³ã³ãåºåã®ãªã¹ãã§ããäŸãã°ä»¥äžã§ãã
æ¢ã«èšåããããã«ãtext/gemini圢åŒã¯è¡æåã§ããtext/geminiææžã®åè¡ã¯åäžã®ãè¡çš®å¥ããæã¡ãŸããè¡ã®æåã®3æåã調ã¹ãããšã§ãã®çš®é¡ãææ§ããªãå€å®ããããšãå¯èœã§ããè¡ã®çš®é¡ãããããšã§å©çšè ã«ã©ã®ããã«è¡šç€ºããããã決å®ããŸããç¹å®ã®è¡ã®çš®é¡ã«é¢é£ä»ãããã衚瀺ãå瀺ã®è©³çŽ°ã¯å³å¯ã«ååå¥ã®è¡ã®ç¯çã«ãããŠå¶éãããŸãã
èš7ã€ã®è¡ã®çš®å¥ããããŸãããããå®å šãªæ©èœãæã¡ä»æ§ã«æºæ ããGeminiã¯ã©ã€ã¢ã³ãã¯ãã®å ã®4ã€ãèªèãæ±ãããããã°è¯ãã®ã§ãããããã¯ãäžæ žã®è¡ã®çš®å¥ãïŒ5.4åç §ïŒã§ããçºå±çãªã¯ã©ã€ã¢ã³ãã¯è¿œå ã§ãçºå±çãªè¡ã®çš®å¥ãïŒ5.5åç §ïŒã«ã€ããŠãæ±ããããã«ã§ããŸããåçŽãªã¯ã©ã€ã¢ã³ãã¯çºå±çãªè¡ã®çš®å¥ã®å šãŠãäžæ žã®è¡ã®çš®å¥ãšç䟡ãªãã®ãšããŠæ±ãã ãã§ããå åãªå©çšè äœéšãæäŸã§ããŸãã
4ã€ã®äžæ žã®è¡ã®çš®å¥ã¯ä»¥äžã®éãã§ãã
ããã¹ãè¡ã¯æãåºæ¬çãªè¡ã®çš®å¥ã§ããããã¯åŸè¿°ããã©ã®è¡ã®çš®å¥ã®å®çŸ©ã«ãåèŽããªãä»»æã®è¡ããæ¢å®ãšããŠããã¹ãè¡ã«ãªããšããããšã§ããããããtext/geminiææžã®å€§å€æ°ã®è¡ããã®ããã¹ãè¡ã«ãªãã§ãããã
ããã¹ãè¡ã¯ã¯ã©ã€ã¢ã³ãã®ç®ã«èŠããç¯å²ã®é©åãªå¹ ã«æãè¿ãããåŸã«å©çšè ã«è¡šç€ºãããã¹ãã§ããããã¹ãè¡ã¯ã¯ãäžè¬çãªèªã¿æ¹ãããäžã§èŠèŠçã«èŠãããããã«å©çšè ã«è¡šç€ºãããã¹ãã§ãã现ããæå³åãã«ã€ããŠã¯ã¯ã©ã€ã¢ã³ãåŽã«è£éããããŸããäŸãã°å¯å€å¹ ã®ãã©ã³ãã䜿ãããŠãè¯ãã§ããã空çœãæ£èŠåãããŠãè¯ãã§ãããåèªéã®ç©ºçœããæã®éã®ç©ºçœãé·ããªãããã«ããŠãè¯ãããšãã£ãæãã§è¡šç€ºäžã®å·¥å€«ãé©çšããã®ã¯æ§ããŸãããã¯ã©ã€ã¢ã³ãã¯ãã©ã³ãããã©ã³ãã®å€§ãããèæ¯è²ãªã©ãå€ããããšã«ãã£ãŠãããã¹ãè¡ã®èŠãç®ãç¬èªã®ãã®ã«ãããããããšãå©çšè ã«èš±ããŠãæ§ããŸãããèè ã¯ããã¹ãã®å 容ã«å°å¿µããããã¹ãè¡ã®ç²Ÿå¯ãªå瀺ã«ã€ããŠç®¡çã§ãããšã¯æããªãããšã§ãããã®ããã«ããŠæ±ããããšæ£ãã衚瀺ãããªããããªASCIIã¢ãŒããã³ã³ãã¥ãŒã¿ãŒã®ãœãŒã¹ã³ãŒããªã©ã¯ãæžåŒåæžã¿åãæ¿ãè¡ã®éã«å²ãŸããã¹ãã§ãïŒ5.4.3åç §ïŒã
空è¡ã¯ããã¹ãè¡ã«å«ãŸããç¹å¥ãªæå³ã¯ãããŸãããããããã«ã€ããŠåçŽãªç©ºã®ç©ºéãšããŠç®ã«èŠããªã圢ã§åå¥ã«å瀺ãããã¹ãã§ããé£ç¶ãã空çœè¡ã¯ããå°ãªã空çœè¡ã«çž®ããã¹ãã§ã¯ãããŸããã
ã¯ã©ã€ã¢ã³ãã®æ©åšã®ç»é¢ã«åãŸãåããé·ãããã¹ãè¡ã¯åãŸãããã«ãæãè¿ããããã¹ãã§ããã€ãŸããé·ãè¡ã¯æ©åšã«é©åãªå¹ ã®è€æ°ã®é£ç¶ããè¡ã«ïŒçæ³çã«ã¯ç©ºçœããã€ãã³ã®ãšããã§ïŒåå²ãããã¹ãã§ãããã®æãè¿ãã¯ããã¹ãã®åè¡ã«ç¬ç«ããŠé©çšãããŸããããããã¯ã©ã€ã¢ã³ãã®æ©åšã®ç»é¢ããçãè€æ°ã®é£ç¶ããããã¹ãè¡ã¯ãããå°ãªãæ°ã§ããé·ãè¡ã«çµåãããã¹ãã§ã¯ãããŸããã
ãã®ããã¹ãæžåŒã®ææ³ãæ倧é掻ãããããtext/geminiã§å 容ãæžãèè ã¯ç¹å®ã®åºå®å¹ ã§æäœæ¥ã§æãè¿ãããšã¯é¿ããã¹ãã§ããããã¯Gopherspaceã®æ £ç¿ãšããŠ80æå以å ã§æãè¿ãã®ãå žåã§ããã®ãšã¯å¯Ÿç §çã§ãããã®ä»£ããã«ãäžç¹ããã®å¡ãšããŠè¡šç€ºãããã¹ãããã¹ãã¯åäžã®é·ãè¡ãšããŠæžãããã¹ãã§ããã»ãšãã©ã®ããã¹ããšãã£ã¿ã¯ããœãããªæãè¿ããã«ããããæ§æã§ããŸããã€ãŸãããããçš®é¡ã®ãã¡ã€ã«ãæžãäžã§åèªã®åäŒã§é·ãè¡ãæãè¿ããŠè¡šç€ºããèè ã®ç»é¢ã®æ©åšã«åãããã«ããã®ã§ãã
å 容ãããŒãã«æãè¿ããªããšæ°ãæžãŸãªãèè ã«æ°ä»ããŠã»ããã®ã§ãããããŒããªæãè¿ãã®é·ããšåãããã以äžã®å¹ ã®ç»é¢ã®æ©åšã®ã¯ã©ã€ã¢ã³ãã§ã¯ããæãã«è¡šç€ºããããšããŠããããããçãã¯ã©ã€ã¢ã³ãã§ã¯äžèŠåãªè¡ã®å¹ ãšãªã£ãŠçŸããŠããŸããŸãã
ã=>ãã®2æåããå§ãŸãè¡ã¯ãªã³ã¯è¡ã§ãããã®è¡ã¯ä»¥äžã®æ§æãããŠããŸãã
=>[<空çœ>]<URL>[<空çœ><å©çšè ã«èŠªãã¿ããããªã³ã¯ã®åå>]
ããã§ã次ã®éãã§ãã
以äžã®äŸã¯å šãŠåŠ¥åœãªãªã³ã¯è¡ã§ãã
=> gemini://example.org/ => gemini://example.org/ ãªã³ã¯ã®äžäŸ => gemini://example.org/foo åããã¹ãã«ããå¥ã®ãªã³ã¯ã®äŸ => foo/bar/baz.txt çžå¯Ÿãªã³ã¯ => gopher://example.org:70/1 gopherã®ãªã³ã¯
ãªã³ã¯è¡å ã®URLã¯RFC 3986ã«ãããã£ãŠäºçŽãããæåãšç©ºçœã¯ããŒã»ã³ãæåã§ç¬Šå·åãããªããã°ãªããŸããã
ãªãããªã³ã¯ã®URLã¯geminiã§ãªãã¹ããŒã ã§ãã£ãŠæ§ããŸãããã€ãŸããGeminiã®ææžã¯åçŽãã€å žé ã«ä»ã®ãããã³ã«ãä»ããŠãã¹ããããŠããææžãžã®ãªã³ã¯ã匵ããã®ã§ããgopherã§ãªãå 容ãžã®ãªã³ã¯ã¯`h`é ç®ã®çš®é¡ã®éæšæºçãªé©å¿ãããããåŸãªãgophermapãšã¯ç°ãªããŸãã
ã¯ã©ã€ã¢ã³ãã¯ã¯ã©ã€ã¢ã³ãã®èè ãæãéãã®ããæ¹ã§ãªã³ã¯ã衚瀺ã§ããŸãããããã¯ã©ã€ã¢ã³ãã¯ã¹ããŒã ããããã¯ãŒã¯ãããã³ã«ã«å¯Ÿå¿ãããªã³ã¯ïŒäŸãã°gemini://ãgopher://ãhttps://ãftp://ãªã©ããå§ãŸããªã³ã¯ïŒã®è¡šç€ºã«ããã£ãŠãããªãèªåçãªãããã¯ãŒã¯æ¥ç¶ãããŠã¯ãªããŸããã
æåã®3æåãã```ãã§ããè¡ïŒã€ãŸãå é ã«ç©ºçœã®ãªã3ã€ã®é£ç¶ããéåŒçšç¬ŠïŒã¯æžåŒåæžã¿åæ¿ãè¡ã§ãããã®è¡ã¯å©çšè ã«è¡šç€ºããå瀺ãããåºåã«å«ãŸããã¹ãã§ã¯ãããŸããããã®ä»£ããã«æ§æ解æåšã¯æžåŒåæžã¿ã¢ãŒãã®ãæå¹ããšãç¡å¹ããåãæ¿ãããŸããæžåŒåæžã¿ã¢ãŒãã¯ææžã®éå§æã¯ãç¡å¹ãã§ããã¹ãã§ããæžåŒåæžã¿ã¢ãŒãã®çŸåšã®ç¶æ ã¯ãæ§æ解æåšãç¶æããå¿ èŠã®ããå éšç¶æ ã§ããã«éããŸãããæžåŒåæžã¿ã¢ãŒãããæå¹ãã®ãšããéåžžã®è¡ãèå¥ããèŠåã¯åæ¢ããå šãŠã®è¡ã¯æžåŒåæžã¿ããã¹ãè¡ãšãªããŸãïŒ5.4.4åç §ïŒã
æžåŒåæžã¿åãæ¿ãè¡ã¯HTMLã§ã®<pre>ãš</pre>ã¿ã°ã®ãããªãã®ãšèããããŸãã
æžåŒåæžã¿ã¢ãŒããæå¹ã«åãæ¿ããæžåŒåæžã¿åæ¿ãè¡ã®å é ã®ã```ã以éã®ããã¹ãã¯ãåãæ¿ãè¡ã«ç¶ãæžåŒåæžã¿ããã¹ãè¡ã«ä»éããã代æ¿ããã¹ãããšããŠã¯ã©ã€ã¢ã³ãã«ãã解éãããŠæ§ããŸããã代æ¿ããã¹ãã®äœ¿çšã¯ã¯ã©ã€ã¢ã³ãã®è£éã«ãããåçŽãªã¯ã©ã€ã¢ã³ãã¯ç¡èŠããŠæ§ããŸããã代æ¿ããã¹ãã¯ASCIIã¢ãŒããããã¹ãããããªãå 容ã«ä»ããããšããå§ãããŸããäŸãã°ãç»é¢èªã¿äžãåšãéããŠå瀺ãããéã«ææå³ã«ç解ã§ããªããã®ã§ãã£ãããæ€çŽ¢ãšã³ãžã³ã«ãã玢åŒãšããŠæå¹æŽ»çšã§ãããã®ã§ãã£ããããŸããã³ã³ãã¥ãŒã¿ã®ãœãŒã¹ã³ãŒãã«äœ¿ã£ãŠããã°ã©ãã³ã°èšèªã®æå®ããŠãæ§ããŸãããçºå±çãªã¯ã©ã€ã¢ã³ãã¯æ§æ圩è²ã«äœ¿ã£ãŠãæ§ããŸããã
æžåŒåæžã¿ã¢ãŒããç¡å¹ã«åãæ¿ããæžåŒåæžã¿åæ¿ãè¡ã®å é ã®ã```ãã«ç¶ãããã¹ãã¯ãã¯ã©ã€ã¢ã³ãã§ç¡èŠãããªããã°ãªããŸããã
æžåŒåæžã¿ã¢ãŒãã§ã¯ããã¹ãè¡ã¯å©çšè ã«å¯ŸããŠãäžç«ãã«ã空çœã®å€æŽãè£ é£Ÿçãªæ¹åãªãã«åºå®å¹ ãã©ã³ãã§è¡šç€ºãããã¹ãã§ããã°ã©ãã£ã«ã«ãªã¯ã©ã€ã¢ã³ãã¯ãã¯ã©ã€ã¢ã³ãã®ç®ã«èŠããç¯å²ãããé·ãæžåŒåæžã¿ããã¹ãè¡ã®è¡šç€ºã«ã€ããŠãæãè¿ããããã¯ç»é¢ã¹ã¯ããŒã«ã®ä»çµã¿ã䜿ãã¹ãã§ããæžåŒåæžã¿ããã¹ãè¡ã衚瀺ããäžã§ãã¯ã©ã€ã¢ã³ãã¯ASCIIã¢ãŒããã³ã³ãã¥ãŒã¿ã®ãœãŒã¹ã³ãŒãã®ãããªæŽ»çšäŸã念é ã«çœ®ãã¹ãã§ããå ·äœçã«ã¯ç©ºçœãéèŠãªèšèªã§æžããããœãŒã¹ã³ãŒãïŒäŸãã°PythonïŒã¯ã¯ã©ã€ã¢ã³ãã§ãã¡ã€ã«ã«åã貌ããããšãã«ç¹ã«åé¡ãªã解éãã³ã³ãã€ã«ãã§ããããã«ãã¹ãã§ããã¯ã©ã€ã¢ã³ãã衚瀺ããããæ¹ã§åé¡ãèµ·ãããªãããã«ãã¹ãã§ãã
以éã®çºå±çãªè¡ã®çš®é¡ã¯çºå±çãªã¯ã©ã€ã¢ã³ãã§ã¯èªèããŠãæ§ããŸããã5.4.1ã«ããããã«åçŽãªã¯ã©ã€ã¢ã³ãã¯å šãŠãããã¹ãè¡ãšããŠæ±ã£ãŠæ§ããŸãããäžå¯æ¬ ãªæ©èœã¯æãªãããŸããã
ã#ãããå§ãŸãè¡ã¯èŠåºãè¡ã§ããèŠåºãè¡ã¯1ã2ã3åã®é£ç¶ããã#ãæåããæ§æãããä»»æã§ç©ºçœãç¶ãããã®åŸãã«èŠåºãã®ããã¹ããæ¥ãŸãã#ãš##ãš###ã¯HTMLã§ã®<h1>ãš<h2>ãš<h3>ã®ãããªãã®ãšèããããŸãã
èŠåºãããã¹ãã®å 容ã¯å©çšè ã«è¡šç€ºãããã¹ãã§ãããã¯ã©ã€ã¢ã³ãã¯ç¹å¥ãªæžåŒåã䜿ã£ãŠæ§ããŸãããäŸãã°èŠåºãã«ãªã£ãŠããããšã瀺ãããã«ãã倧ããã£ãã倪ãã£ãããããã©ã³ãã䜿ããªã©ã§ãïŒåçŽãªã¯ã©ã€ã¢ã³ãã§ã¯å é ã®#ãå«ããŠãã®è¡ã衚瀺ããå šãè£ é£ŸããªããŠæ§ããŸããïŒãããããèŠåºãè¡ã®äž»çŒã®ç®çã¯è£ 食ã®ããã§ãªãæå³è«çãªãã®ã§ãããææžã®å éšæ§é ã«ã€ããŠã®æ©æ¢°ã§èªã¿åããè¡šçŸãæäŸããããšãªã®ã§ããçºå±çãªã¯ã©ã€ã¢ã³ãã¯ãã®æ å ±ã䜿ã£ãŠãäŸãã°é·ãææžã«ã€ããŠã¯ç»é¢èã«éå±€çã«æžåŒåããããç®æ¬¡ããèªåçã«çæããŠè¡šç€ºããŠæ§ããŸããããããããšå©çšè ã¯ç°¡åã«ç¹å®ã®ç¯ã«é£ã¶ããšãã§ããã¹ã¯ããŒã«ããŸãããªããŠè¯ããªããŸããCMSçãªããŒã«ã«ã€ããŠã¯ããã£ã¬ã¯ããªå ã®gemtextææžã«å¯ŸããŠã¡ãã¥ãŒãAtom/RSSãã£ãŒããèªåçæããã®ã«ããã¡ã€ã«ã®æåã®èŠåºãã人éã芪ãã¿ãããé¡åãšããŠäœ¿ããŸãã
ã* ãããå§ãŸãè¡ã¯é äžåãªã¹ãé ç®ã§ãããã®è¡ã®çš®é¡ã¯çŽç²ã«è£ 食äžã®çç±ããååšããŠããŸãã*ã¯çºå±çãªã¯ã©ã€ã¢ã³ãã§ã¯ç¹ã®èšå·ã§çœ®ãæããŠãæ§ããŸãããã* ãã®åŸã®ããã¹ãã¯ããããããã¹ãè¡ã®ããã«å©çšè ã«è¡šç€ºãããã¹ãã§ããã€ãŸããç®ã«èŠããç¯å²ã«åãŸãããã«æãè¿ãããããæããã«æžåŒåããã®ã§ããçºå±çãªã¯ã©ã€ã¢ã³ãã¯ç¹ã®èšå·ã®ç©ºçœãèæ ®ã«å ¥ããŠãé·ããªã¹ãé ç®ãæãè¿ããšãã«ãã®é ç®ã«å¯Ÿå¿ããå šãŠã®è¡ãç»é¢ç«¯ããçããè·é¢ã§éã空ãããã«ããããšãã§ããŸãã
ã>ãããå§ãŸãè¡ã¯åŒçšè¡ã§ãããã®è¡ã®çš®é¡ãååšããŠããã®ã¯ãçºå±çãªã¯ã©ã€ã¢ã³ããèªè ã®ããã«è£ 食ã®åºå¥ãã§ããããã«ããããã§ããç¹å®ã®ããã¹ããå€éšã®è³æããåŒçšããããã®ã ãšãããããªãéèŠãªæå³è«çãªæ å ±ãèªè ã«äŒãããŸããäŸãã°ãé·ãè¡ãç®ã«èŠããç¯å²ã«æãè¿ããšããçµæçã«è¡šç€ºãããåè¡ã«ã¯åæ¹ã«ã>ãèšå·ã眮ãããŠããŠãæ§ããŸããã
3.2ã§åäžæ¡ã®ã³ãŒã1ã§ã®å®çŸ©ã«åŸããŸãã
ç¶æ ã³ãŒã10ã«åŸããŸããããã¹ã¯ãŒãã®ãããªæ©å¯æ§ã®ããå ¥åã«äœ¿çšããŸããã¯ã©ã€ã¢ã³ãã¯ç¶æ ã³ãŒã10ã«åŸã£ãŠè³ªåã衚瀺ãã¹ãã§ãããå©çšè ã®å ¥åã¯ãè©è¶ãã«èŠããŠãèªã¿åãããããšãé²ãããã«ãç»é¢ã«è¡šç€ºãã¹ãã§ã¯ãããŸããã
3.2ã®åäžæ¡ã³ãŒã2ã®å®çŸ©ã«åŸããŸãã
3.2ã®åäžæ¡3ã®å®çŸ©ã«åŸããŸãã
èŠæ±ãããè³æºã¯äžè²«ããŠå°æ¥ãäžããããæ°ããURLã«èŠæ±ãã¹ãã§ããæ€çŽ¢ãšã³ãžã³ã®çŽ¢åŒäœæåšãå 容åéåšã¯æ§æãæŽæ°ããŠå€ãURLã«èŠæ±ããããšãé¿ãããšã³ããŠãŒã¶ãŒã®ã¯ã©ã€ã¢ã³ãã¯èªåçã«ããã¯ããŒã¯ãæŽæ°ããããªã©ãã¹ãã§ãããªãç¶æ ã³ãŒãã®æåã®æ¡ã ãã«æ³šæãæãã¯ã©ã€ã¢ã³ãã¯ãããäžæçãªãªãã€ã¬ã¯ããšããŠæ±ããŸããããã§ãæ£ããå Žæã«è¡ãçããŸããããã®ãªãã€ã¬ã¯ããæ°žä¹ ã®ãã®ã§ãããã©ããã®ç¥èã掻çšã§ããŸãããã§ãããæ¯åãªãã€ã¬ã¯ãã«åŸããªããã°ãªããªãããšã«ããå°ããªå¹çäžã®ä»£åãæããŸãã
3.2ã®åäžæ¡4ã®å®çŸ©ã«åŸããŸãã
ãªãŒããŒããŒãããµãŒããŒã®ä¿å®äœæ¥ã®ããå©çšã§ããŸããïŒHTTP 503ãšé¢é£ïŒã
CGIãããã«äŒŒãåçãªå 容ãçæããã·ã¹ãã ã®åŠçãäºæããç°åžžçµäºãããæéåãã«ãªã£ããããŸããã
ãµãŒããŒãæ£åžžã«ãªã¢ãŒããã¹ããšã®ãã©ã³ã¶ã¯ã·ã§ã³ãå®äºã§ããªãã£ãããããããã·ã®èŠæ±ã倱æããŸããïŒHTTP 502ã504ãšé¢é£ïŒã
ã¬ãŒãå¶éãå¹ããŠããŸãã<ã¡ã¿æ å ±>ã¯ã¯ã©ã€ã¢ã³ããå¥ã®èŠæ±ããã®ãµãŒããŒã«ããåã«åŸ æ©ããªããã°ãããªãç§æ°ã®æŽæ°å€ã§ãïŒHTTP 429ãé¢é£ïŒã
3.2ã®åäžæ¡ã³ãŒãã®å®çŸ©ã«åŸããŸãã
èŠæ±ãããè³æºã¯èŠä»ãããŸããã§ããããå°æ¥ã¯å©çšã§ãããããããŸããïŒHTTP 404ãé¢é£ïŒïŒãã®éèŠãªç¶æ ã³ãŒããã©ãã«ãããŠèŠããããšããŠããŸããïŒç°¡åãªããšã§ãããšãªã¢51ã§ã¯é ããããã®ã¯èŠä»ããããŸãããããïŒã
èŠæ±ãããè³æºã¯ææ©å ¥æã§ããåã³æã«å ¥ãããšããããŸãããæ€çŽ¢ãšã³ãžã³ãé¡ããããŒã«ã¯ãã®è³æºã玢åŒããåé€ãã¹ãã§ããå 容åéåšã¯è³æºã®èŠæ±ãæ¢ããŠäººéã®å©çšè ã«è³ŒèªããŠããè³æºãæ£éžããããšãäŒããã¹ãã§ãïŒHTTP 410ãé¢é£ïŒã
ãã¡ã€ã³ã®è³æºãžã®èŠæ±ããµãŒããŒããéãããããµãŒããŒããããã·ã®èŠæ±ãåãä»ããŸããã
ãµãŒããŒãã¯ã©ã€ã¢ã³ãã®èŠæ±ã解æããŸããã§ãããééã£ãŠæžåŒåãããèŠæ±ã§ãã£ããããšèŠãããŸãïŒHTTP 400ã«é¢é£ïŒã
3.2ã®åäžã³ãŒã6ã®å®çŸ©ã«åŸããŸãã
äžããããã¯ã©ã€ã¢ã³ã蚌ææžã¯ç¹å®ã®èŠæ±ãããè³æºã«ã¢ã¯ã»ã¹ããæš©éããããŸãããåé¡ã¯èšŒææžèªäœã«ã¯ç¡ããä»ã®è³æºã«ã€ããŠã¯æš©éãããå¯èœæ§ããããŸãã
äžããããã¯ã©ã€ã¢ã³ã蚌ææžãäžåœã§ããããåãä»ããããŸããã§ãããããã¯èšŒææžã®å 容ãããèªèº«ã«åé¡ãããããšã瀺ããŠãããç¹å®ã®èŠæ±ãããè³æºã«ã€ããŠã¯èæ ®ãããŸãããæããããããªåå ã¯èšŒææžã®åŠ¥åœæ§ã®éå§æ¥ãæªæ¥ã«ãªã£ãŠãããæéæ¥ãéããŠãããã§ããããã®ã³ãŒãã¯äžåœãªã·ã°ããã£ãX509æšæºèŠä»¶ã®éåã瀺ããŠããå¯èœæ§ããããŸãã<ã¡ã¿æ å ±>ã¯å³å¯ãªãšã©ãŒã«ã€ããŠã®æ å ±ãæäŸãã¹ãã§ãã