OK I don't know Ruby but I think the person maintaining the SOH scripts should
give them a look.
I used
soh query --verbose --service https://example.org --query myquery.sparql
and I got the 400 error. The output of --verbose shows me the exact GET request,
GET https://example.org?query=select...
and if I use curl it works OK
curl https://example.org?query=select...
by the way, the same is true with --post.
The Ruby docs
(https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#class-Net::HTTP-label-HTTPS)
seems to suggest that either a 'net/https' module is required, or that
use_ssl=(flag) is required. I don't see any of those in the s-query and soh
scripts. I'm pretty confident that it's an issue with the scripts.
Sent: Friday, November 09, 2018 at 4:37 PM
From: "Andy Seaborne" <[email protected]>
To: [email protected]
Subject: Re: SOH HTTPS
>> $ ./soh query --service=
^^^^
Something did:
"http://...:443/"
which is not the way to do https. nginx picked this up.
Should be "https://"
(if nginx is configured to run https over :80, all sorts of things are
likely to go wrong).
---------------------
The library SOH uses may well support "https://", else use curl.
Andy
On 09/11/2018 14:29, Laura Morales wrote:
> Yes, behind a nginx reverse proxy (not controlled by me).
>
>
>
> Sent: Friday, November 09, 2018 at 3:17 PM
> From: ajs6f <[email protected]>
> To: [email protected]
> Subject: Re: SOH HTTPS
> Are you sending this to a Fuseki endpoint? It does not appear so.
>
> ajs6f
>
>> On Nov 9, 2018, at 9:04 AM, Laura Morales <[email protected]> wrote:
>>
>> How to use Fuseki SOH with HTTPS?
>>
>> $ ./soh query --service= --query= >> <html>
>> <head>
>> <title>
>> 400 The plain HTTP request was sent to HTTPS port
>> </title>
>> </head>
>> <body bgcolor="white">
>> <center>
>> <h1>
>> 400 Bad Request
>> </h1>
>> </center>
>> <center>
>> The plain HTTP request was sent to HTTPS port
>> </center>
>> <hr>
>> <center>
>> nginx/1.12.1
>> </center>
>> </body>
>> </html>
>
>