Commits

Anonymous committed b742c5c

Protobuffer uses octet-stream as its default content type

Comments (0)

Files changed (2)

python/protorpc/protobuf.py

 from google.net.proto import ProtocolBuffer
 
 
-__all__ = ['CONTENT_TYPE',
+__all__ = ['ALTERNATIVE_CONTENT_TYPES',
+           'CONTENT_TYPE',
            'encode_message',
            'decode_message',
           ]
 
-CONTENT_TYPE = 'application/x-google-protobuf'
+CONTENT_TYPE = 'application/octet-stream'
+
+ALTERNATIVE_CONTENT_TYPES = ['application/x-google-protobuf']
 
 
 class _Encoder(ProtocolBuffer.Encoder):

python/protorpc/webapp/service_handlers_test.py

 class ProtobufRPCMapperTest(ProtocolMapperTestBase, RPCMapperTestBase):
   """Test the protobuf encoded RPC mapper."""
 
-  content_type = 'application/x-google-protobuf'
+  content_type = 'application/octet-stream'
   protocol = protobuf
   mapper = service_handlers.ProtobufRPCMapper