Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2017-02-07 14:33:03 +0000
committerGerrit Code Review @ Eclipse.org2017-02-09 11:20:18 +0000
commit7a5348c60580327689d5fb9a440089242f0ca2e7 (patch)
treeec9ccbc0cfb9201bb431be0e66ba3bea72486cf5
parent91164b3e6213c23c7abade8b5073d881cd83d713 (diff)
downloadorg.eclipse.rap-7a5348c60580327689d5fb9a440089242f0ca2e7.tar.gz
org.eclipse.rap-7a5348c60580327689d5fb9a440089242f0ca2e7.tar.xz
org.eclipse.rap-7a5348c60580327689d5fb9a440089242f0ca2e7.zip
Set Content-Type response header of server push requests
According to the RFC 2616 [1], responses without Content-Type header should treat it as type "application/octet-stream". There is a bug in latest Firefox versions that responses with no Content-Type header default to "xml", which leads to error. [1] https://tools.ietf.org/html/rfc2616#section-7.2.1 Change-Id: I5fbee04aefc6cda5ed59bec6680c0446781663bc
-rw-r--r--bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/serverpush/ServerPushServiceHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/serverpush/ServerPushServiceHandler.java b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/serverpush/ServerPushServiceHandler.java
index d20f172be5..71ca702e0f 100644
--- a/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/serverpush/ServerPushServiceHandler.java
+++ b/bundles/org.eclipse.rap.rwt/src/org/eclipse/rap/rwt/internal/serverpush/ServerPushServiceHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2007, 2017 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ public class ServerPushServiceHandler implements ServiceHandler {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=410157
response.setHeader( "Cache-Control", "no-cache, no-store, must-revalidate" );
response.setHeader( "Pragma", "no-cache" );
+ response.setHeader( "Content-Type", "application/octet-stream" );
response.setDateHeader( "Expires", 0 );
}

Back to the top