idnits 2.17.00 (12 Aug 2021) /tmp/idnits10449/draft-ietf-urn-ietf-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2022-05-20) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 28 longer pages, the longest (page 2) being 60 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 29 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 7 instances of too long lines in the document, the longest one being 14 characters in excess of 72. ** There are 16 instances of lines with control characters in the document. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 211: '...escaping of characters in the NSS MUST...' Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (June 1998) is 8740 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: '0' is mentioned on line 375, but not defined -- Looks like a reference, but probably isn't: '0-9' on line 375 ** Obsolete normative reference: RFC 2141 (ref. '1') (Obsoleted by RFC 8141) ** Obsolete normative reference: RFC 2234 (ref. '2') (Obsoleted by RFC 4234) Summary: 14 errors (**), 0 flaws (~~), 4 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet-Draft Ryan Moats 3 draft-ietf-urn-ietf-06.txt AT&T 4 Expires in six months June 1998 6 A URN Namespace for IETF Documents 7 Filename: draft-ietf-urn-ietf-06.txt 9 Status of This Memo 11 This document is an Internet-Draft. Internet-Drafts are working 12 documents of the Internet Engineering Task Force (IETF), its 13 areas, and its working groups. Note that other groups may also 14 distribute working documents as Internet-Drafts. 16 Internet-Drafts are draft documents valid for a maximum of six 17 months and may be updated, replaced, or obsoleted by other 18 documents at any time. It is inappropriate to use Internet- 19 Drafts as reference material or to cite them other than as ``work 20 in progress.'' 22 To learn the current status of any Internet-Draft, please check 23 the ``1id-abstracts.txt'' listing contained in the Internet- 24 Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net 25 (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East 26 Coast), or ftp.isi.edu (US West Coast). 28 Abstract 30 A system for Uniform Resource Names (URNs) must be capable of 31 supporting new naming systems. As an example of proposing a new 32 namespace, this document proposes the 'ietf' namespace. This 33 namespace consists of the RFC family of documents (RFCs, STDs, FYIs, 34 and BCPs) developed by the IETF and published by the RFC editor and 35 the minutes of working groups (WG) and birds of a feather (BOF) 36 meetings that occur during IETF conferences. Both the current URN 37 framework and URN syntax support this namespace. 39 0.1 Changes from -02 41 This document has been restructured to use the template proposed in 42 draft-ietf-urn-nid-req-03.txt. Example Perl scripts for resolving 43 this namespace have been supplied in an Appendix. 45 0.2 Changes from -03 47 Text was added to the template clarifying persistence and uniqueness. 48 Support for the BCP document series added to the examples and the 49 ABNF. 51 0.3 Changes from -04 53 More clarifications for the persistence section. In addition, 54 cleaned up some typos and ensured that the Appendix examples are 55 functional 57 0.4 Changes from -05 59 Based on a number of requests, i-ds have been added to the structure 60 and resolvers. In addition, some examples have been added. 62 1. Introduction 64 This document proposes the "ietf" namespace, which consists of the 65 RFC family of documents (RFCs, STDs, FYIs, and BCPs) developed by the 66 IETF and published by the RFC editor and the minutes of working 67 groups (WG) and birds of a feather (BOF) meetings that occur during 68 IETF conferences. 70 The namespace specification is for a formal namespace. 72 2. Specification Template 74 Namespace ID: 76 "ietf" requested. 78 Declared registrant of the namespace: 80 Ryan Moats 81 jayhawk@att.com 83 Declaration of structure: 85 The identifier has the following ABNF [2] specification: 87 NSS = (family ":" number) / ("mtg-" number "-" wgbofname) 88 ( "id:" name) 89 family = "rfc" / "std" / "fyi" / "bcp" 90 number = 1*DIGIT 91 wgbofname = 1*LETDIGIT 92 name = id draft designation with "draft-" and trailing 93 type removed (e.g. ietf-urn-ietf-06) 94 LETDIGIT = DIGIT / %x41-%x5a / %x61-%x7a 95 DIGIT = %x30-%x39 97 If the IESG (or it successor) adds a new document 98 series, this ABNF specification will need to be 99 updated. Further, if a working group or BOF is 100 created that used characters outside the range of this 101 ABNF specification, this specification will need to be 102 updated. Any system intended to resolve names for 103 this namespace should be written with the awareness 104 that this could occur at any time. 106 Identifier uniqueness considerations: 108 Because the rfc-editor assigns the RFC number uniquely 109 these URNs are unique. Since the mapping between RFCs 110 and other rfc-editor document series (STDs, FYIs or 111 BCPs) is not necessarily one-to-one, uniqueness of 112 STDs, FYIs and BCPs are defined based on the document 113 mappings maintained by the RFC Editor (the index files 114 "rfc-index.txt", "fyi-index.txt", "bcp-index.txt", 115 "std-index.txt") are defined to be the definitive 116 statement of the assignment of RFC Family URNs in this 117 namespace. The meeting minutes portion of the 118 namespace is guaranteed unique because the URN 119 includes the sequence number of the IETF conference. 120 The document mapping maintained by the Internet Drafts 121 editor ("1id-abstracts.txt") is defined as the 122 definitive statement of the assignment of URNs for 123 the internet draft portion of this namespace. 125 Identifier persistence considerations: 127 Persistence of the URNs of this namespace is 128 independent of the mutability of the underlying 129 documents. A URN once assigned will never be 130 reassigned to a different resource; the assignment is 131 persistent and immutable. Distinct from this, the 132 resources identified as RFCs are immutable, whereas 133 the other sorts of documents, STDs, FYIs, and BCPs are 134 not. They may be composites of one or more RFCs and 135 the set of RFCs that comprise them may change with 136 time. It is important to note that this mutability of 137 some resources is independent of the immutability of 138 URN assignment to a resource. 140 Process of identifier assignment: 142 Assignment of URNs from this namespace occurs in two 143 ways. The first is when a new RFC, FYI, STD or BCP is 144 passed by the IESG and published by the RFC 145 Editor. This new document will have a new series 146 number and will therefore define a new URN. The 147 document mappings maintained by the RFC Editor (the 148 index files "rfc-index.txt", "fyi-index.txt", 149 "bcp-index.txt" and "std-index.txt") are defined to be 150 the definitive statement of the assignment of RFC 151 Family URNs in this namespace. 153 The second way a URN is assigned is when a working 154 group or birds of a feather files meeting minutes as 155 part of an IETF conference. The list of minutes 156 maintained by the IETF for each working group and 157 conference in the subtree pointed at by the URL 158 ftp://ietf.org/ietf/ is considered the definitive 159 assignment of URNs for working group or birds of a 160 feather minutes. 162 The third way a URN is assigned is through the 163 publication of a new internet-draft by the Internet 164 Draft Editor. This draft will have a distinct name 165 (and version number) and therefore defined a new URN. 166 The document mapping maintained by the Internet Drafts 167 editor ("1id-abstracts.txt") is defined as the 168 definitive statement of the assignment of URNs for 169 this portion of the namespace. 171 Process of identifier resolution: 173 A mirrored copy of the underlying documentation is 174 required to resolve these URNs. Resolution via 175 HTTP is accomplished by a set of simple Perl cgi-bin 176 scripts presented in Appendix A. 178 Rules for Lexical Equivalence: 180 The entire URN is case-insensitive. 182 Conformance with URN Syntax: 184 There are no additional characters reserved. 186 Validation mechanism: 188 None specified. 190 Scope: 192 Global. 194 3. Examples 196 The following are examples of URNs that a resolver for this namespace 197 can resolve: 199 urn:ietf:rfc:2141 200 urn:ietf:std:50 201 urn:ietf:id:ietf-urn-ietf-06.txt 202 urn:ietf:mtg-41-urn 204 4. Security Considerations 206 Because this namespace defines no additional reserved characters, it 207 does not add any security considerations beyond those inherent from 208 the existence of the reserved characters from [1]. Further, none of 209 the reserved characters from [1] are used in the definition of the 210 NSS. This means that resolvers for this namespace may be considered 211 "secure" in the sense that any escaping of characters in the NSS MUST 212 result in the resolver indicating that the URN has incorrect syntax. 214 5. Acknowledgments 216 Thanks to various members of the URN working group for comments on 217 earlier drafts of this document. The work described in this document 218 is partially supported by the National Science Foundation, 219 Cooperative Agreement NCR-9218179. 221 6. References 223 Request For Comments (RFC) and Internet Draft documents are available 224 from and numerous mirror sites. 226 [1] R. Moats, "URN Syntax," RFC 2141, May 5, 1997. 228 [2] D. Crocker, P. Overell, "Augmented BNF for Syntax 229 Specifications: ABNF," RFC 2234, November 1997. 231 7. Author's Address 233 Ryan Moats 234 AT&T 235 15621 Drexel Circle 236 Omaha, NE 68135-2358 237 USA 239 Phone: +1 402 894-9456 240 EMail: jayhawk@att.com 242 Appendix A. Example Resolution Scripts 244 The following scripts are examples that can be used for resolving 245 URNs in this namespace. 247 A.1 I2C 249 #!/usr/local/bin/perl 251 use strict; 253 # 254 # this is a URN 2 URC resolver for the ietf namespace 255 # 257 my(%cite) = ( 258 bcp => "/ftp/rfc/bcp-index.txt", 259 fyi => "/ftp/fyi/fyi-index.txt", 260 id => "/ftp/internet-drafts/1id-abstracts.txt", 261 rfc => "/ftp/rfc/rfc-index.txt", 262 std => "/ftp/std/std-index.txt" 263 ); 264 my(%number2date) = ( 265 41 => "98apr", 266 40 => "97dec", 39 => "97aug", 38 => "97apr", 267 37 => "96dec", 36 => "96jun", 35 => "96mar", 268 34 => "95dec", 33 => "95jul", 32 => "95apr", 269 31 => "94dec", 30 => "94jul", 29 => "94mar", 270 28 => "93nov", 27 => "93jul", 26 => "93mar", 271 25 => "92nov", 24 => "92jul", 23 => "92mar", 272 22 => "91nov", 21 => "91jul", 20 => "91mar", 273 19 => "90dec" ); 275 my($wgpath) = "/ftp/ietf"; 276 my($urn) = $ENV{'QUERY_STRING'}; 277 my($host) = $ENV{'SERVER_NAME'}; #get my host name for ftp: URLs 278 my($accept) = $ENV{'HTTP_ACCEPT'}; #this is the "Accept:" HTTP header 280 (&resolveid($1), exit) if ($urn =~ /urn:ietf:id:(i); 281 (&resolverfc($1, $2), exit) if ($urn =~ /urn:ietf:(72)/i); 282 (&resolvemtg($1, $2), exit) if ($urn =~ /urn:ietf:mtg-(9*)-( 283 120&urn_error("400 Bad Request0); 284 sub resolvemtg { 285 my($ietfnum, $sesnam) = @_; 286 &urn_error("404 Not Found0) if (!defined $number2date{$ietfnum}); 287 my($date)=$number2date{$ietfnum}; 288 my($link)="$wgpath/$sesnam/$sesnam-minutes-$date.txt"; 289 if (-f $link) { 290 print "Status: 200 OK70; 291 print "Content-type: text/html70; 292 print "0TITLE>Citation for $urn0; 293 print "0; 294 print "

0/HTML>0; 297 return; 298 } 299 my($link)="$wgpath/$date/$sesnam-minutes-$date.txt"; 300 if (-f $link) { 301 print "Status: 200 OK70; 302 print "Content-type: text/html70; 303 print "0TITLE>Citation for $urn0; 304 print "0; 305 print "

0/HTML>0; 308 return; 309 } 310 &urn_error("404 Not Found0); 311 } 313 sub end { 314 my($inarg)=@_; 315 return $inarg . "st" if ($inarg =~ /1$/); 316 return $inarg . "nd" if ($inarg =~ /2$/); 317 return $inarg . "rd" if ($inarg =~ /3$/); 318 return $inarg . "th"; 319 } 321 sub resolverfc { 322 my($flag,@bib,$i,$k,$j,$done,@ref); 323 my($l,$link); 324 my($scheme, $value) = @_; 325 $scheme =~ tr/A-Z/a-z/; 326 if (!defined $cite{$scheme}) { 327 &urn_error("404 Not Found0); 328 } 330 $flag = 0; 331 open(INPUT, "$cite{$scheme}"); 332 while () { 333 $flag = 1 if (/^0*$value /); 334 if ($flag == 1) { 335 last if (/^$/); 336 chop; 337 push @bib,$_; 338 } 339 } 341 if ($scheme ne "rfc") { 342 print "Status: 200 OK70; 343 print "Content-type: text/html70; 344 $bib[0] =~ s/^[0-9]*//; 345 for ($i=0; $i<=$#bib; $i+=1) { 346 last if ($bib[$i] =~ s/././); 347 } 348 for ($i=0;$i<=$#bib;$i+=1) { 349 $k=$bib[$i]; 350 while ($k =~ /(fyi|std|rfc|bcp)([0-9]+)(.*)/i) { 351 push @ref,"$1$2"; 352 $k=$3; 353 } 354 $done=""; 355 foreach $j (@ref) { 356 next if ($done =~ $j); 357 $done .= "$j "; 358 $l = $j; 359 $l =~ tr/A-Z/a-z/; 360 $link=&make_link("$l"); 361 $bib[$i] =~ s/$j/$j/g; 362 } 363 } 364 print "0TITLE>Citation for $urn0; 365 print "0; 366 $link=&make_link("$scheme$value"); 367 print "

0/HTML>0; 372 } else { 373 print "Status: 200 OK70; 374 print "Content-type: text/html70; 375 $bib[0] =~ s/^[0-9]*//; 376 $j=0; 377 for ($i=0; $i<=$#bib; $i+=1) { 378 $j += ($bib[$i] =~ s/, "/, "/); 379 $j += ($bib[$i] =~ s/",/",/); 381 } 382 for ($i=0;$i<=$#bib;$i+=1) { 383 $k=$bib[$i]; 384 while ($k =~ /(fyistdrfc|bcp)([0-9]+)(.*)/i) { 385 push @ref,"$1$2"; 386 $k=$3; 387 } 388 $done=""; 389 foreach $j (@ref) { 390 next if ($done =~ $j); 391 $done .= "$j "; 392 $l = $j; 393 $l =~ s//g; 394 $l =~ tr/A-Z/a-z/; 395 $link=&make_link("$l"); 396 $bib[$i] =~ s/$j/$j/g; 397 } 398 } 399 print "0TITLE>Citation for $urn0; 400 print "0; 401 $link=&make_link("$scheme$value"); 402 print "

0/HTML>0; 407 } 408 } 410 sub make_link { 411 my($sc); 412 my($inarg)=@_; 413 ($sc=$1) if ($inarg =~ /([a-z]*)/); 414 return "/$sc/$inarg.ps" if (-e "/ftp/$sc/$inarg.ps"); 415 return "/$sc/$inarg.html" if (-e "/ftp/$sc/$inarg.html"); 416 return "/$sc/$inarg.txt"; 417 } 419 sub urn_error { 420 my($code) = @_; #store failure code here... 422 print "Status: $code"; 423 print "Content-type: text/html0HTML>0; 424 print "URN Resolution: I2C $code0; 425 print "0; 426 print "

URN to URC resolution failed for the URN:

0; 427 print "

$urn

0; 428 print "0; 429 print "0; 430 exit; 431 }; 433 sub resolveid { 434 my($flag,@bib,$i,$k,$j,$count,@ref); 435 my($l,$link, $hdr, $done); 436 my($value) = @_; 437 my($scheme) = "id"; 439 open(INPUT, "$cite{$scheme}"); 440 while () { 441 # 442 # capture record 443 # 444 if ($flag == 1 || /^ 445 push @bib,$_; 446 ($hdr = -1, $count = 0, $flag = 1) if (/^ 447 $count++ if (/^/); 448 } 449 if ($count == 1) { 450 $hdr = $#bib if ($hdr == -1); 451 } 452 if ($count == 2) { 453 for ($i=0; $i<=$hdr; $i+=1) { 454 if ($bib[$i] =~ /<(.*)>/) { 455 $l = $1; 456 if ($l eq "draft-$value.txt" || $l eq "draft-$value.ps") { 457 print "Status: 200 OK70; 458 print "Content-type: text/html70; 459 print "0TITLE>Citation for $urn0; 460 print "0; 461 print "
0; 463 foreach $i (@bib) { 464 print "$i"; 465 } 466 print "0; 467 print "0/HTML>0; 468 exit; 469 } 470 } 471 } 472 $flag = 0; 473 @bib = (); 474 } 475 } 476 &urn_error("404 Not Found0); 478 } 480 A.2 I2L 482 #!/usr/local/bin/perl 484 use strict; 486 # 487 # this is a URN 2 URL resolver for the ietf namespace 488 # 490 my(%pathbase) = ( 491 rfc => "rfc/rfc", 492 fyi => "fyi/fyi", 493 std => "std/std", 494 bcp => "bcp/bcp", 495 id => "internet-drafts/draft-", 496 ); 498 my(%number2date) = ( 499 41 => "98apr", 500 40 => "97dec", 39 => "97aug", 38 => "97apr", 501 37 => "96dec", 36 => "96jun", 35 => "96mar", 502 34 => "95dec", 33 => "95jul", 32 => "95apr", 503 31 => "94dec", 30 => "94jul", 29 => "94mar", 504 28 => "93nov", 27 => "93jul", 26 => "93mar", 505 25 => "92nov", 24 => "92jul", 23 => "92mar", 506 22 => "91nov", 21 => "91jul", 20 => "91mar", 507 19 => "90dec" ); 509 my($wgpath) = "/ftp/ietf"; 510 my($urn) = $ENV{'QUERY_STRING'}; 511 my($host) = $ENV{'SERVER_NAME'}; #get my host name for ftp: URLs 512 my($accept) = $ENV{'HTTP_ACCEPT'}; #this is the "Accept:" HTTP header 514 (&resolveid($1), exit) if ($urn =~ /urn:ietf:id:(i); 515 (&resolverfc($1, $2), exit) if ($urn =~ /urn:ietf:(72)/i); 516 (&resolvemtg($1, $2), exit) if ($urn =~ /urn:ietf:mtg-(9*)-( 517 120&urn_error("400 Bad Request0); 519 sub resolvemtg { 520 my($ietfnum, $sesnam) = @_; 521 &urn_error("404 Not Found0) if (!defined $number2date{$ietfnum}); 522 my($date)=$number2date{$ietfnum}; 523 my($link)="$wgpath/$sesnam/$sesnam-minutes-$date.txt"; 524 if (-f $link) { 525 print "Status: 302 Moved temporarily0; 526 print "Location: $link0; 527 return; 528 } 529 my($link)="$wgpath/$date/$sesnam-minutes-$date.txt"; 530 if (-f $link) { 531 print "Status: 302 Moved temporarily0; 532 print "Location: $link0; 533 return; 534 } 535 &urn_error("404 Not Found0); 536 } 538 sub end { 539 my($inarg)=@_; 540 return $inarg . "st" if ($inarg =~ /1$/); 541 return $inarg . "nd" if ($inarg =~ /2$/); 542 return $inarg . "rd" if ($inarg =~ /3$/); 543 return $inarg . "th"; 544 } 546 sub resolverfc { 547 my($flag,@bib,$i,$k,$j,$done,@ref); 548 my($l,$link); 549 my($scheme, $value) = @_; 550 $scheme =~ tr/A-Z/a-z/; 551 &urn_error("404 Not Found0)if (!defined $pathbase{$scheme}); 552 my($txttry)="/ftp/$pathbase{$scheme}$value.txt"; 553 my($pstry)="/ftp/$pathbase{$scheme}$value.ps"; 554 my($htmltry)="/ftp/$pathbase{$scheme}$value.html"; 555 MIME_SWITCH: { 556 if ($accept =~ /application/postscript/ && -f $pstry) { 557 print "Status: 302 Moved temporarily0; 558 print "Location: http://$host/$pathbase{$scheme}$value.ps0; 559 last MIME_SWITCH; 560 } 561 if ($accept =~ /text/html/ && -f $htmltry) { 562 print "Status: 302 Moved temporarily0; 563 print "Location: http://$host/$pathbase{$scheme}$value.html0; 564 last MIME_SWITCH; 565 } 566 if ($accept =~ /text/plain/ && -f $txttry) { 567 print "Status: 302 Moved temporarily0; 568 print "Location: http://$host/$pathbase{$scheme}$value.txt0; 569 last MIME_SWITCH; 570 } 571 &urn_error("404 Not Found0); 572 } 573 } 574 sub urn_error { 575 my($code) = @_; #store failure code here... 577 print "Status: $code"; 578 print "Content-type: text/html0HTML>0; 579 print "URN Resolution: I2L $code0; 580 print "0; 581 print "

URN to URL resolution failed for the URN:

0; 582 print "

$urn

0; 583 print "0; 584 print "0; 585 exit; 586 } 588 sub resolveid { 589 my($flag,@bib,$i,$k,$j,$done,@ref); 590 my($l,$link); 591 my($scheme) = "id"; 592 my($value) = @_; 593 $scheme =~ tr/A-Z/a-z/; 594 &urn_error("404 Not Found0)if (!defined $pathbase{$scheme}); 595 my($txttry)="/ftp/$pathbase{$scheme}$value.txt"; 596 my($pstry)="/ftp/$pathbase{$scheme}$value.ps"; 597 my($htmltry)="/ftp/$pathbase{$scheme}$value.html"; 598 MIME_SWITCH: { 599 if ($accept =~ /application/postscript/ && -f $pstry) { 600 print "Status: 302 Moved temporarily0; 601 print "Location: http://$host/$pathbase{$scheme}$value.ps0; 602 last MIME_SWITCH; 603 } 604 if ($accept =~ /text/html/ && -f $htmltry) { 605 print "Status: 302 Moved temporarily0; 606 print "Location: http://$host/$pathbase{$scheme}$value.html0; 607 last MIME_SWITCH; 608 } 609 if ($accept =~ /text/plain/ && -f $txttry) { 610 print "Status: 302 Moved temporarily0; 611 print "Location: http://$host/$pathbase{$scheme}$value.txt0; 612 last MIME_SWITCH; 613 } 614 &urn_error("404 Not Found0); 615 } 616 } 618 A.3 I2Ls 620 #!/usr/local/bin/perl 621 use strict; 623 # 624 # this is a URN 2 URLs resolver for the ietf namespace 625 # 627 my(@urls); 629 my(%pathbase) = ( 630 rfc => "rfc/rfc", 631 fyi => "fyi/fyi", 632 std => "std/std", 633 bcp => "bcp/bcp", 634 id => "internet-drafts/draft-" 635 ); 637 my(%number2date) = ( 638 41 => "98apr", 639 40 => "97dec", 39 => "97aug", 38 => "97apr", 640 37 => "96dec", 36 => "96jun", 35 => "96mar", 641 34 => "95dec", 33 => "95jul", 32 => "95apr", 642 31 => "94dec", 30 => "94jul", 29 => "94mar", 643 28 => "93nov", 27 => "93jul", 26 => "93mar", 644 25 => "92nov", 24 => "92jul", 23 => "92mar", 645 22 => "91nov", 21 => "91jul", 20 => "91mar", 646 19 => "90dec" ); 648 my($wgpath) = "/ftp/ietf"; 649 my($urn) = $ENV{'QUERY_STRING'}; 650 my($host) = $ENV{'SERVER_NAME'}; #get my host name for ftp: URLs 651 my($accept) = $ENV{'HTTP_ACCEPT'}; #this is the "Accept:" HTTP header 653 (&resolveid($1), exit) if ($urn =~ /urn:ietf:id:(i); 654 (&resolve1($1, $2), exit) if ($urn =~ /urn:ietf:(72)/i); 655 (&resolve2($1, $2), exit) if ($urn =~ /urn:ietf:mtg-(9*)-( 656 120&urn_error("400 Bad Request0); 658 sub resolve2 { 659 my($ietfnum, $sesnam) = @_; 660 &urn_error("404 Not Found0) if (!defined $number2date{$ietfnum}); 661 my($date)=$number2date{$ietfnum}; 662 my($link)="$wgpath/$sesnam/$sesnam-minutes-$date.txt"; 663 if (-f $link) { 664 $link=~s/^/ftp///; 665 my($ftplink)="ftp://$host/$link"; 666 my($httplink)="http://$host/$link"; 667 my($glink)="gopher://$host:70/0/$link"; 668 if ($accept =~ /text/uri-list/) { #look for text/uri-list, otherwise text/html 669 print "Status: 200 OK0; 670 print "Content-type: text/uri-list0; 671 print "#$urn0; 672 print "$ftplink0; 673 print "$httplink0; 674 print "$glink0; 675 } 676 if ($accept =~ /text/html/) { 677 print "Status: 200 OK0; 678 print "Content-type: text/html0HTML>0; 679 print "URN Resolution: I2Ls0; 680 print "0; 681 print "

URN $urn resolves to the following URLs:

0; 682 print "