<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
Received: with ECARTIS (v1.0.0; list gopher);
 Mon, 04 Nov 2002 18:45:46 -0500 (EST)
Return-Path: &lt;hardburn@runbox.com&gt;
Delivered-To: gopher@complete.org
Received: from aibo.runbox.com (aibo.runbox.com [193.71.199.94])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(Client did not present a certificate)
	by gesundheit.complete.org (Postfix) with ESMTP id A7922644A2
	for &lt;gopher@complete.org&gt;; Mon,  4 Nov 2002 18:45:45 -0500 (EST)
Received: from [10.9.9.9] (helo=fetch.runbox.com)
	by lufsen.runbox.com with esmtp (Exim 4.05-VA-mm1)
	id 188quc-00072z-00
	for gopher@complete.org; Tue, 05 Nov 2002 00:45:42 +0100
Received: from [204.71.148.59] (helo=enterprise)
	(Authenticated Sender=hardburn)
	by fetch.runbox.com with asmtp (Exim 3.35 #1)
	id 188quK-0007G0-00
	for gopher@complete.org; Tue, 05 Nov 2002 00:45:25 +0100
From: Timm Murray &lt;hardburn@runbox.com&gt;
To: gopher@complete.org
Subject: [gopher] Re: Gopher+ Uploading
Date: Mon, 4 Nov 2002 17:46:55 -0600
X-Mailer: KMail [version 1.4]
References: &lt;Pine.LNX.4.44.0211050102490.277-100000@carina.happy-ent.de&gt;
In-Reply-To: &lt;Pine.LNX.4.44.0211050102490.277-100000@carina.happy-ent.de&gt;
MIME-Version: 1.0
Content-type: text/plain
Message-Id: &lt;200211041746.58933.hardburn@runbox.com&gt;
Content-Transfer-Encoding: 8bit
X-archive-position: 710
X-ecartis-version: Ecartis v1.0.0
Sender: gopher-bounce@complete.org
Errors-to: gopher-bounce@complete.org
X-original-sender: hardburn@runbox.com
Precedence: bulk
Reply-to: gopher@complete.org
List-help: &lt;mailto:ecartis@complete.org?Subject=help&gt;
List-unsubscribe: &lt;mailto:gopher-request@complete.org?Subject=unsubscribe&gt;
List-software: Ecartis version 1.0.0
List-ID: Gopher &lt;gopher.complete.org&gt;
X-List-ID: Gopher &lt;gopher.complete.org&gt;
List-subscribe: &lt;mailto:gopher-request@complete.org?Subject=subscribe&gt;
List-owner: &lt;mailto:jgoerzen@complete.org&gt;
List-post: &lt;mailto:gopher@complete.org&gt;
List-archive: &lt;http://www.complete.org/mailinglists/archives/&gt;
X-list: gopher
</p>
<p>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
</p>
<p>Excelent points.  I&#x27;ve added these suggestions to the protocol.  The current
document is attached.
</p>
<p>On Monday 04 November 2002 18:06, wzk@happy-ent.de wrote:
&gt; Hello,
&gt;
&gt; the e-mail configuration of my brand new linux computer wasn&#x27;t as good as
&gt; I thought.  However, a quick talk to my provider gave me the (hopefully)
&gt; right hint.
&gt;
&gt; ---------- Forwarded message ----------
&gt; Date: Sat, 2 Nov 2002 02:00:47 +0100 (CET)
&gt; From: wzk@happy-ent.de
&gt; To: gopher@complete.org
&gt; Subject: Re: [gopher] Gopher+ Uploading
&gt;
&gt; Hello Timm,
&gt;
&gt; nice proposal, but (you expected it) I have some comments.
&gt;
&gt;   1. The client should tell the server the suggested gopher type of the
&gt;      uploaded file.  The server can act with this information as with the
&gt;      other, use or ignore (and override) it.
&gt;
&gt;   2. The server should send a final response after the file has been
&gt;      uploaded (this implies that a filesize of -2 as upload parameter can
&gt;      not be used).  I suggest three types of responses.  Each response
&gt;      is formatted like a gopher directory entry:
&gt;
&gt; 	3Error processing upload
&gt;
&gt;      to signal an error,
&gt;
&gt; 	iUpload accepted
&gt;
&gt;      to tell the client that the upload is ok, and the full item&#x27;s
&gt;      gopher directory entry
&gt;
&gt; 	&lt;type&gt;\t&lt;title&gt;\t&lt;selector&gt;\t&lt;server&gt;\t&lt;port&gt;
&gt;
&gt;      to tell the client that everything is ok and to give him the
&gt;      location of the file.
&gt;
&gt;      In case the upload is ok the server may choose if it sends only
&gt;      the basic `i&#x27;-ok or the whole directory entry.  The latter assumes
&gt;      that the server has processed the upload completly which may not
&gt;      be always true.
&gt;
&gt;
&gt; Regards
&gt;
&gt; Wolfgang Zekoll
</p>
<p>- --
Timm Murray
GPG Key Fingerprint: 32E9 DBAF 8089 ECB7 696D  560B AA9B 9E29 C69C 7CB4
- ----------
Intel CPUs are not defective, they just act that way.
		--Henry Spencer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
</p>
<p>iEYEARECAAYFAj3HBvEACgkQqpueKcacfLTnWQCdFEK3eINzatlxGl0MUk461i35
dAQAn0Ho4LWinJSf0XJwl/b+H9Csbtlm
=7JDr
-----END PGP SIGNATURE-----
</p>
<p></p>
<p>-- Attached file included as plaintext by Ecartis --
-- File: Gopher+-Upload.txt
</p>
<p>Gopher+ Uploading
</p>
<p>By Timm Murray
</p>
<p>CHANGELOG
</p>
<p>Nov. 4, 2002 -- Added Wolfgang Zekoll&#x27;s suggestions.
	(Client sends Gopher type and server sending final response)
</p>
<p></p>
<p>INTRODUCTION
</p>
<p>This document describes a means of uploading files to a Gopher server using Gopher+
attributes.
</p>
<p>In breaking with Gopher tradition, this document uses &#x27;\t&#x27; to denote a
tab, &#x27;\r&#x27; to denote a cariage return, and &#x27;\n&#x27; to denote a newline.
&#x27;C:&#x27; is a line of text sent by the client, and &#x27;S: is a line sent by the
server.
</p>
<p></p>
<p>MENU SELECTOR
</p>
<p>&#x27;u&#x27; is defined as being the item type indicating an upload selector.  It is recommended
that any upload fields use Gopher+ Authentication before allowing an upload.
</p>
<p>Example:
</p>
<p>uUpload a file\t/incoming\thost\tport\t*\r\n
</p>
<p>Clients should expect to go through the +ASK exchange for the upload even if
a &#x27;?&#x27; is not present in the Gopher+ section.
</p>
<p></p>
<p>PREFORMING THE UPLOAD
</p>
<p>After the optional authentication exchange, the client sends meta information about
the file being uploaded.  The following exchange takes place:
</p>
<p>C: [selector string] \r\n
S: +ASK \r\n
S: Ask: Size of file (bytes)? \r\n
S: Ask: Selector string to put under? \r\n
S: Ask: Gopher type? \r\n
S: AskF: File to send \r\n
S: AskL: Additional information \r\n
C: &lt;size of file, in bytes&gt; \r\n
C: &lt;description&gt; \r\n
C: &lt;selector string&gt; \r\n
C: &lt;gopher type&gt; \r\n
C: &lt;filename&gt; \r\n
C: &lt;additional info&gt; \r\n
C: &lt;the file itself&gt;
S: iUpload accepted
S: &lt;type&gt; \t &lt;title&gt; \t &lt;selector&gt; \t &lt;server&gt; \t &lt;port&gt; \r\n
</p>
<p>In keeping with Gopher+, a size of -1 means &quot;read data until a period on a line
by itself&quot;.  A size of -2 means &quot;read data until I close the connection&quot; (this
meathod is strongly discouraged).  Any size of &gt;= 0 means &quot;read this many bytes,
then close the connection&quot;.
</p>
<p>The &quot;description&quot; sent MAY be used by servers for the &#x27;user&#x27; field in menu entries.
Clients SHOULD keep this under 70 characters, in keeping with Gopher tradition for
&#x27;user&#x27; fields.  It MUST NOT contain any tab characters.
</p>
<p>The &quot;selector string&quot; sent for the file MAY be ignored by servers.  It is used only as a
guide for servers that choose to use it.
</p>
<p>Like the selector string, the &quot;gopher type&quot; sent MAY be ignored by servers.  It
specifies the suggested Gopher type for this file.
</p>
<p>The filename sent MUST be ignored by servers.  The &quot;AskF&quot; statement mearly provides the
client with a chance to open a file dialog box so the user can choose the file to send
(or however else the client wishes to handle it).  Clients MAY send an empty string
for the filename.
</p>
<p>[&quot;Additional info&quot; section]
</p>
<p></p>
<p>Once the file is transfered, and assuming that the size sent was not -2
(&quot;read until I close the connection&quot;), the server returns one of two messages.
</p>
<p>If the file is accepted, the server returns:
</p>
<p>S: iUpload accepted \r\n
S: &lt;type&gt; \t &lt;title&gt; \t &lt;selector&gt; \t &lt;server&gt; \t &lt;port&gt; \r\n
</p>
<p>This tells the client the final position of the file on the server.  This
information MAY be different than what was actually sent by the client.
</p>
<p>If the file is not accepted, an error message is sent:
</p>
<p>S: 3Error uploading file
</p>
<p></p>
<p></p>
<p></p>
<p></p>
</card>
</wml>
