A callback used to handle requests to a classServer.
path and query contain the likewise-named components of the
Request-URI, subject to certain assumptions. By default,
classServer decodes all percent-encoding in the URI path, such that
"/foo2Fbar" is treated the same as "/foo/bar". If your
server is serving resources in some non-POSIX-filesystem namespace,
you may want to distinguish those as two distinct paths. In that
case, you can set the propertyServer:raw-paths property when creating
the classServer, and it will leave those characters undecoded.
query contains the query component of the Request-URI parsed according to
the rules for HTML form handling. Although this is the only commonly-used
query string format in HTTP, there is nothing that actually requires that
HTTP URIs use that format; if your server needs to use some other format, you
can just ignore query, and call soup.message.Message.getUri and parse the URI's
query field yourself.
A callback used to handle requests to a classServer.
path and query contain the likewise-named components of the Request-URI, subject to certain assumptions. By default, classServer decodes all percent-encoding in the URI path, such that "/foo2Fbar" is treated the same as "/foo/bar". If your server is serving resources in some non-POSIX-filesystem namespace, you may want to distinguish those as two distinct paths. In that case, you can set the propertyServer:raw-paths property when creating the classServer, and it will leave those characters undecoded.
query contains the query component of the Request-URI parsed according to the rules for HTML form handling. Although this is the only commonly-used query string format in HTTP, there is nothing that actually requires that HTTP URIs use that format; if your server needs to use some other format, you can just ignore query, and call soup.message.Message.getUri and parse the URI's query field yourself.
See soup.server.Server.addHandler and soup.server.Server.addEarlyHandler for details of what handlers can/should do.