sniper icon indicating copy to clipboard operation
sniper copied to clipboard

HTTPS POST always "failing"

Open schuSF opened this issue 8 years ago • 1 comments

I have a server running, listen on 2 ports locally; HTTP on 8080 and HTTPS on 8443.

Sniper seems to be functioning properly when I make a HTTP POST, with an output like this.

user:sniper-benchmark user$ sniper -c 5 -n 100 -p file.json -T application/json http://localhost:8080/listening/path
This is Sniper ,version 1.0 
Copyright (C) 2013 by Lubia Yang, et al.
This is free software; open source on github.com/lubia/sniper.

The server is now under snipe ...

Completed 10 requests
Completed 20 requests
Completed 30 requests
Completed 40 requests
Completed 50 requests
Completed 60 requests
Completed 70 requests
Completed 80 requests
Completed 90 requests
Completed 100 requests
Transactions:                   100 hits
Availability:                   100.00 %
Elapsed time:                   0.05 secs
Document length:               101 Bytes
TotalTransfer:                  0.01 MB
Transaction rate:            2126.95 trans/sec
Throughput:                     0.20 MB/sec
Successful:                     100 hits
Failed:                           0 hits
TransactionTime:               2.270 ms(mean)
ConnectionTime:                0.135 ms(mean)
ProcessTime:                   2.134 ms(mean)
StateCode:                    100(code 200)

However, when I try to make a HTTPS POST, Sniper is having problems connecting with the service (I am able to POST via the command line curl command). My Sniper output looks like this.

user:sniper-benchmark user$ sniper -c 5 -n 100 -p file.json -T application/json https://localhost:8443/listening/path
This is Sniper ,version 1.0 
Copyright (C) 2013 by Lubia Yang, et al.
This is free software; open source on github.com/lubia/sniper.

The server is now under snipe ...

Transactions:                   1000000 hits
Availability:                    0.00 %
Elapsed time:                   0.57 secs
Document length:               101 Bytes
TotalTransfer:                  0.00 MB
Transaction rate:               0.00 trans/sec
Throughput:                     0.00 MB/sec
Successful:                     0 hits
Failed:                           1000000 hits
TransactionTime:               0.000 ms(mean)
ConnectionTime:                0.000 ms(mean)
ProcessTime:                   0.000 ms(mean)
StateCode:                    0(code 200)

Here is my .sniperc file used.

[protocol]
version = HTTP/1.1
#connection = keep-alive 
connection = close
#accept-encoding = gzip
user-agent = golang & sniper

[header]
#cookie = SSID=Abh_TYcDc6YSQh-GB

[process]
timeout = 100
failures = 1000000

[Authenticate]
#login = jeff:supersecret

[ssl]
ssl-cert = /path/to/ssl-cert
ssl-key = /path/to/ssl-key
ssl-timeout = 100

As you can see, I have put in valid paths to the ssl key/cert and tried to up the timeout/failures. But nothing seems to work. Any help would be appreciated.

schuSF avatar Jun 20 '16 23:06 schuSF

https mode need some improvement,i will fix it lately,maybe without cert file?what do you think?

btfak avatar Jul 04 '16 03:07 btfak