Commit 8a009e55 authored by Thomas Milius's avatar Thomas Milius
Browse files

Replace AddMethds. Much better text by Robert

parent 63f3a54b
AcornHTTP is designed very flexibel but it is limited to the classical
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.
It is a pitty that AcornHTTP can't be used to handle them so I analyzed
the code and found that it can be extended quite simply.
Extra HTTP Methods Details
==========================
I expanded AcornHTTP as follows to cope with additional HTTP methods.
Every application which wants to use AcornHTTP with a HTTP non standard
method has to register this method by using SWI HTTP_RegisterMethod
0x083fbb.
Registers in
r0 - Name of non standard HTTP Method (eg. REPORT)
r1 - Method flags (meaning see below)
AcornHTTP is designed to be very flexible but it is limited to the classical
HTTP methods.
Registers out
r2 - Number of method to use within other AcornHTTP SWIs or
-1 in case that registration of method failed.
Since its original design a couple of other HTTP methods have been defined for
various purposes e.g. for WebDAV, CalDAV etc. which are more or less popular.
Many methods are in fact similar to the standard set (GET/PUT etc) and so
can be handled by changing AcornHTTP quite simply.
Every client which wants to use AcornHTTP with a non standard HTTP method
registers the method details via a protocol specific SWI.
When a client no longer makes usage of the registered HTTP non standard
method especally when qutting it has to deregister its method(s). This allows
other applications to reuse the method number for their own purposes.
SWI HTTP_RegisterMethod
=======================
On entry:
R0 - pointer to the name of non standard HTTP method (eg. REPORT)
R1 - method flags
Bit
0-1 type
0 - Caller must setup everything
1 - Behave like PUT/POST
2 - Behave like GET
3 - Unused
2-31 reserved (0)
On exit:
R2 - opaque method number to use within other AcornHTTP SWIs
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).
Methods flags are defined as follows
Bit
0-1 - Type
0 - Caller must setup everything
1 - Behave like PUT/POST
2 - Behave like GET
3 - Unused
2-31 reserved
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)
Registers out
none
June 2021
SWI HTTP_DeregisterMethod
=========================
On entry:
R0 - pointer to the name of non standard HTTP method (eg. REPORT)
R1 - method flags (as were set when registering)
Thomas Milius
\ No newline at end of file
No exit defined
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