[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Handle-info] Question mark in handle extension



If you use a template handle with a question mark, then the question mark is part of the handle, and needs to be percent-encoded in the hdl.handle.net URL.

To elaborate, in the link http://hdl.handle.net/prefix/suffix@service1?query , the handle is "prefix/suffix@service1".  The query string "query" is extra information used by hdl.handle.net to process the request for that handle.  But, in the link http://hdl.handle.net/prefix/suffix@service1%3Fquery , the handle is "prefix/suffix@service1?query".

Or even more technically, the handle as seen by hdl.handle.net is exactly the URL "path" component as described in RFC 3986, omitting the initial slash.

Robert


On Tue, Apr 20, 2021 at 4:03 AM Franziska Weng <fweng@geomar.de> wrote:

Hi Robert,

thank you for your fast reply.

We cannot use the urlappend query parameter, because urlappend isn't service interface standard of our services hence clients won't include it in their requests. The clients won't use browsers and queries will contain continuous values, so using hash-fragment or 10320/loc for service queries are no options, I think.

Because we only have one server that provides the services, we use the namespace template to build the redirect URL from prefix, suffix, servicename and query. I observed that when I set the namespace template to '... <if value="extension" test="matches" _expression_="(service1|service2)[?](.+)" parameter="par_service_query"> ...' handles like hdl.handle.net/suffix/prefix@service1?query result in the default 10320/loc location, but when I set it to '... <if value="extension" test="matches" _expression_="(service1|service2)=(.+)" parameter="par_service_query"> ...' handles like hdl.handle.net/suffix/prefix@service1=query work. Characters behind the question mark in the extension seem to be cut off before the namespace template is applied. Is there a way to change this behavior?

Best regards,

Franziska


Am 19.04.21 um 17:52 schrieb Robert Tupelo-Schneck:
There are several ways to have variable behavior via hdl.handle.net resolution, which generally means changing the behavior on the web server to which hdl.handle.net resolution is redirected.

One, browsers will transmit the hash-fragment across a redirection.  So https://hdl.handle.net/20.1000/5555#foo redirects to http://www.handle.net/#foo.  The web page redirection can then act on the hash-fragment.

Two, the "urlappend" query parameter will append something to the URL.  https://hdl.handle.net/20.1000/5555?urlappend=%3Ffoo=bar redirects to http://www.handle.net/?foo=bar.

Three, the locatt facility of 10320/loc multiple redirection may be relevant; note in particular the "locatt" facility.  See https://www.handle.net/overviews/handle_type_10320_loc.html .

Additionally, template handles might be relevant.  This is a way to have the handle server produce handle resolutions at resolution time, without needing to store all the handles.  See Chapter 11 of the Handle Technical Manual http://www.handle.net/tech_manual/HN_Tech_Manual_9.pdf.

Best,
Robert



On Mon, Apr 19, 2021 at 11:15 AM Franziska Weng <fweng@geomar.de> wrote:
Hi all,

is it possible to use a question mark in a handle extension? If so,
which server settings do I need to change?

We would like to redirect to services and use queries, e.g.
hdl.handle.net/suffix/prefix@servicename?query.

Best regards,

Franziska


--
Franziska Weng
Information, Data and Computing Centre
GEOMAR
Helmholtz Centre for Ocean Research Kiel
Wischhofstr. 1-3
D-24148 Kiel, Germany

Room: 01/111 (Entrance 2)
Tel: +49 (0)431 / 600-2173
E-Mail:fweng@geomar.de
https://www.geomar.de


_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info
-- 
Franziska Weng
Information, Data and Computing Centre
GEOMAR
Helmholtz Centre for Ocean Research Kiel
Wischhofstr. 1-3
D-24148 Kiel, Germany

Room: 01/111 (Entrance 2)
Tel: +49 (0)431 / 600-2173
E-Mail:fweng@geomar.de
https://www.geomar.de
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info