[jbosstools-issues] [JBoss JIRA] (JBIDE-26086) SSP server does not send error codes for bad requests

Rob Stryker (JIRA) issues at jboss.org
Thu Jun 7 13:06:00 EDT 2018


    [ https://issues.jboss.org/browse/JBIDE-26086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13588272#comment-13588272 ] 

Rob Stryker edited comment on JBIDE-26086 at 6/7/18 1:05 PM:
-------------------------------------------------------------

Steps to reproduce:
  1) Start server
  2) Switch to a new terminal
  3) type telnet 127.0.0.1 27511
  4) Paste following block:

{code}
GET / HTTP/1.1
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: 4vrbTo0+BlSk5wK7si6SWQ==
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Host: localhost:27511
{code}

  6) Note the server has error output

{code}
Jun 07, 2018 1:02:55 PM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError
SEVERE: Missing header Content-Length in input "GET / HTTP/1.1
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: 4vrbTo0+BlSk5wK7si6SWQ==
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Host: localhost:27511

"
java.lang.IllegalStateException: Missing header Content-Length in input "GET / HTTP/1.1
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: 4vrbTo0+BlSk5wK7si6SWQ==
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Host: localhost:27511

"
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:89)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
{code}

  7) Note the telnet client receives no response at all from the server. 


was (Author: rob.stryker):
Steps to reproduce:
  1) Start server
  2) Switch to a new terminal
  3) type telnet 127.0.0.1 27511
  4) Paste following block:

{code}
GET / HTTP/1.1
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: 4vrbTo0+BlSk5wK7si6SWQ==
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Host: localhost:27511
{code}

  6) Note the server has error output
  7) Note the telnet client receives no response at all from the server. 

> SSP server does not send error codes for bad requests
> -----------------------------------------------------
>
>                 Key: JBIDE-26086
>                 URL: https://issues.jboss.org/browse/JBIDE-26086
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: stack-server-protocol
>    Affects Versions: 4.6.0.AM3
>            Reporter: Jan Richter
>            Assignee: Rob Stryker
>
> Sending a request the server does not like produces no response, it is simply logged on the server side and the client is not notified of what happened. Something like a code 400 would be appreciated.
> For example, initiating a connection with no content-length header simply logs the following on the server side, but the client is stuck waiting.
> {noformat}java.lang.IllegalStateException: Missing header Content-Length in input "GET / HTTP/1.1
> Sec-WebSocket-Version: 13
> Sec-WebSocket-Key: 4vrbTo0+BlSk5wK7si6SWQ==
> Connection: Upgrade
> Upgrade: websocket
> Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
> Host: localhost:27511
> "
> 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:89)
> 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at java.lang.Thread.run(Thread.java:748){noformat}
> This is most likely a 'feature' of lsp4j, thoughts?



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jbosstools-issues mailing list