Subject: [Tools-discuss] You lose

From: Carsten Bormann <[email-masked]>
Date: Fri, 24 Jul 2020 11:17:37 +0200

<html><head><title>You lose</title></head><body><style>.error { color: red; }</style>
<h1 class='error'>Error: format must be set to one of</h1>
<pre class='error'>ascii pdf epub mobi rtf ps
(found v3ascii)</pre>
<pre></pre>
<hr/>
<address>Apache/2.2.22 (Debian) Server at xml2rfc.tools.ietf.org Port 80</address>
 <span style='font-size: xx-small'>durif
</span></body></html>

What should I now use in place of http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi ?  Or is there a new secret parameter for selecting v3 processing?

Grüße, Carsten

---

From: Henrik Levkowetz <[email-masked]>
Date: Fri, 24 Jul 2020 13:08:23 +0200

Hi Carsten,

On 2020-07-24 11:17, Carsten Bormann wrote:
> What should I now use in place of 
> http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi ?  Or is there a
> new secret parameter for selecting v3 processing?

I'd be better able to help you with more information about the input you
provided:  Input format, options selected, etc.  I've processed a draft
through the web service after the latest xml2rfc upgrade, and just verified
with another.

Disclaimer: I'm not a mind reader.

	Henrik

---

From: Carsten Bormann <[email-masked]>
Date: Sat, 25 Jul 2020 20:39:56 +0200

>> new secret parameter for selecting v3 processing?

Hi Henrik,

(Since I do have a workaround, please don’t read now if you are busy preparing for 108.)

> provided:  Input format, options selected, etc.  

Unfortunately, this code has worked so well for a while that I never put in debug code.

Let me start by explaining how I even got to test this.
I (unknown to me) messed up my python3 installation, which makes xml2rfc fail.
kdrfc doesn’t hesitate to use the web service when that happens, and it only tells you about that if you use verbose mode (which I did not do as I wasn’t expecting a problem).
So I have no idea when the v3 support broke (or even if it ever worked).

Right now, the code uses:
  url = URI('http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi’)

In the copy of that that is in the xml2rfc repo, I don’t find any v3 support.

If I change this to:
  url = URI('http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc-dev.cgi’)

it works again, as that code has v3 support.

Is this the interface I should be using now, or is there a more stable one?
(I’m switching to it for 1.3.10, for now.)

> I've processed a draft
> through the web service

Yes.  I think my main confusion is what “the web service” is at any specific point in time (I came from https://xml2rfc.tools.ietf.org/, which seems to point to xml2rfc.cgi).

> after the latest xml2rfc upgrade, and just verified
> with another.
> 

I put in some diagnostic code to reduce the amount of mind reading needed…

*** HTTP response has unexpected content_type text/html with status 200, ["url/form: ", #<URI::HTTP http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi>, [["modeAsFormat", "txt/v3ascii"], ["type", "binary"], ["input", #<File:draft-bormann-cbor-packed.xml>, {:filename=>"input.xml", :content_type=>"text/plain"}]]]

Grüße, Carsten

---

From: Henrik Levkowetz <[email-masked]>
Date: Sat, 25 Jul 2020 22:48:24 +0200

Hi Carsten,

Beginning with an understanding gleaned from the content below:  The
essential missing piece of information, which I now got, was that this
was in the context not of a xml2rfc.tools.ietf.org form submission, but
direct invocation of the CGI script from kdrfc.  That piece of information
makes it much easier to dig into this.

More inline.

On 2020-07-25 20:39, Carsten Bormann wrote:
>> I'd be better able to help you with more information about the
>> input you provided: Input format, options selected, etc.  
> 
> Let me start by explaining how I even got to test this. I (unknown
> to me) messed up my python3 installation, which makes xml2rfc fail. 
> kdrfc doesn’t hesitate to use the web service when that happens, and
> it only tells you about that if you use verbose mode (which I did not
> do as I wasn’t expecting a problem). So I have no idea when the v3
> support broke (or even if it ever worked).
> 

Nothing has intentionally been changed.  I don't know if Tony Hansen, who's
the primary maintainer of the xml2rfc.tools.ietf.org form processing, has
made changes behind the scenes, but if I check the timestamp of all the
.cgi files, they are all dated Nov 19, 2019; so there is no obvious change
there either.

FWIW, using xml2rfc-dev.cgi seems like a decent workaround.

>> I've processed a draft through the web service
> 
> Yes. I think my main confusion is what “the web service” is at any
> specific point in time (I came from https://xml2rfc.tools.ietf.org/,
> which seems to point to xml2rfc.cgi).

Ack; given the understanding I now have of how you came to run into the
issue at hand, I understand the indeterminacy here.

>> after the latest xml2rfc upgrade, and just verified with another.
>> 
> *** HTTP response has unexpected content_type text/html with status
> 200, ["url/form: ", #<URI::HTTP
> http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi>, [["modeAsFormat",
> "txt/v3ascii"], ["type", "binary"], ["input",
> #<File:draft-bormann-cbor-packed.xml>, {:filename=>"input.xml",
> :content_type=>"text/plain"}]]] <html><head><title>You
> lose</title></head><body><style>.error { color: red; }</style> <h1
> class='error'>Error: format must be set to one of</h1> <pre
> class='error'>ascii pdf epub mobi rtf ps (found v3ascii)</pre> 
> <pre></pre> <hr/> <address>Apache/2.2.22 (Debian) Server at
> xml2rfc.tools.ietf.org Port 80</address> <span style='font-size:
> xx-small'>durif </span></body></html>

And checking the various .cgi processing scripts, I see that indeed, only
xml2rfc-dev.cgi has support for v3ascii.

Best regards,

	Henrik

---

From: Carsten Bormann <[email-masked]>
Date: Sat, 25 Jul 2020 23:01:05 +0200

> FWIW, using xml2rfc-dev.cgi seems like a decent workaround.

Thank you for confirming this so quickly!

(What helped me find the solution was to simply search my laptop for xml2rfc.cgi, finding it in the xml2rfc source working copy, and finding the -dev right beside it.  I have to remind myself to use the source, Luke, even if I don’t know I have it…)

Grüße, Carsten