Commit fe3c340e authored by Thomas Milius's avatar Thomas Milius
Browse files

Replace AddMethds after concept change

parent 6872cbac
AcornHTTP is designed very flexibel but it is limited to the classical
HTTP Methods.
HTTP methods.
During the time a couple of other HTTP methods have been defined for various
purposes e.g. for WebDAV, CalDAV etc. which are more or minor popular.
......@@ -9,22 +9,23 @@ the code and found that it can be extended quite simply.
I expanded AcornHTTP as follows to cope with additional HTTP methods.
Inside
Every application which wants to use AcornHTTP with a HTTP non standard
method has to register this method by using SWI HTTP_RegisterMethod
0x083fbb.
Choices:WWW.AcornHTTP
Registers in
r0 - Name of non standard HTTP Method (eg. REPORT)
r1 - Method flags (meaning see below)
a file called
Registers out
r2 - Number of method to use within other AcornHTTP SWIs or
-1 in case that registration of method failed.
UsrMthds
Any number in method range 1-127 may be returned as valid result except the
method number which are fixed assigned to HTTP standard methods (GET, HEAD,
POST, PUT, OPTIONS, TRACE, DELETE).
can be given which content if present will be loaded during the
initialization of AcornHTTP into an array of 256 entries.
It consists of lines of the following format
MethodNumber=[DecimalFlags,]Method
Flags are defined as follows
Methods flags are defined as follows
Bit
0-1 - Type
......@@ -34,19 +35,18 @@ Bit
3 - Unused
2-31 reserved
MethodNumber is the number of the method passed to URL_GetURL.
Acorn has defined that number 128-255 can be used by the user for its own
purposes.
When an application no longer makes usage of the registered HTTP non standard
method especally when qutting it has to deregister its method(s) by calling
SWI HTTP_DeregisterMethod 0x083fbc. This allows other applications to use the
method number for their own purposes.
Registers in
r0 - Name of non standard HTTP Method (eg. REPORT)
r1 - Method flags (meaning see below)
During start of an URL fetch. Acorn HTTP tries to look up the text used
at beginning of the first line of the URL. This was hardcoded. If no
translation is found launching of the URL will fail. I added a look up
into the array here. If there is an entry inside the array for the method
the text given inside UsrMthds as "Method" will be used to launch the URL.
Additionally flags can be defined. The only usage in the moment is to emulate
internal AcornHTTP header behaviour of PUT/POST or GET for the additional
methods.
Registers out
none
May 2021
June 2021
Thomas Milius
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment