Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-1088

Failure to reconnect when server restarts

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: master, 4.1.2.Final
    • Fix Version/s: None
    • Component/s: ErraiBus
    • Labels:
      None

      Description

        • This actually affects 4.1.2.Final

      The following code in HttpPollingHandler does not handle the case where the contentType is null.

        private static void validateContentType(final Response response) {
          int statusCode = response.getStatusCode();
          // in case the response is OK (200), then the content type always has to be 'application/json'
          if (statusCode == 200) {
            String contentType = response.getHeader("Content-Type");
            if (!contentType.contains("application/json")) {
              String content = response.getText();
              throw new InvalidBusContentException(contentType, content);
            }
          }
        }
      

      As well, when the session expires, it does not appear to be sending it back with a content type, which causes the NPE above.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mbarkley Max Barkley
                Reporter:
                jblinick Josh B
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: