code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong 'request' tag

opened this issue · comments

The library generates 'request' tags like this one .

<request metadataPrefix="oai_dc" verb="ListRecords">https://my.url.edu/catalog/oai</request>

Shouldn't it be :

<request>https://my.url.edu//catalog/oai?verb=ListRecords&metadataPrefix=oai_dc</request>

This line :

@builder.request(provider.url, (@request_options.merge(:verb => verb) unless self.class == Error))
adds URL parameters as XML attributes instead of concatenating them.

It should add : "?" + @request_options.merge(:verb => verb).to_param to the url.