Some extra bytes appended to the http response by GzipResponseStream
My project needs to open pdf in browser. But the IE tells me that the file cannot be open by default program. It is either corrupted or has a incorrect filetype. And IE tries to download it.
I trace the http response by HttpWatch and find the content type is "application/pdf" which seems correct. And then I notice that there are some extra bytes in the http resposne. I use a servlet to retrieve the pdf file. The last few bytes of the http response are "%%EOF\n\r\n0\r\n\r\n". The last seven bytes "\r\n0\r\n\r\n" are the extra ones. I suspect these bytes are added by GzipResponseStream according to my debug result. But I dont have the source code so I am not sure.
If I do not use servlet but get the pdf file directly the http response will end with "%%EOF\n" and IE can open it successfully.
And I checked all responses from servlet they all have the extra seven bytes. Sometimes it cause the IE crash.
I appreciate if anyone can tell me what the problem is.
This is not a problem. I never know it is the chunked encoding of http protocol.
Similar Messages
-
How to change the HTTP Response as XML (Content Type "text\xml") ?
Hi Friends ,
I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as " OK" . In the connection test trace i have seen the Content Type as "text/html" but * I need to get as "text\xml" .*
I need to get response back as XML not plain text .
1 Any Configuration setting do we need to do on Service (SICF ) ?
2. Or any other place we need to modify to get the HTTP Response as XML not plain text
Can you please help to solve the problem . Any clue ?
Thanks & Regards.,
V.Rangarajan
Edited by: ranga rajan on Jan 2, 2008 2:07 PMDear users,
we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
Using HTTP_AAE Receiver adapter.
The response message was failed while excution of the message mapping with the error
Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
Regards,
Sudir. -
How to change the HTTP Response as XML (Content Type "text\xml") When Post
Hi Friends ,
I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as " OK" . In the connection test trace i have seen the Content Type as "text/html" but * I need to get as XML format no Srting ( Type "text\xml" . ) *
I need to get response back as XML not plain text .
1 Any Configuration setting do we need to do on Service (SICF ) ?
2. Or any other place we need to modify to get the HTTP Response as XML not plain text
Can you please help to solve the problem . Any clue ?
Thanks & Regards.,
V.RangarajanDear users,
we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
Using HTTP_AAE Receiver adapter.
The response message was failed while excution of the message mapping with the error
Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
Regards,
Sudir. -
Scheduled report failures - Unexpected error getting the HTTP response
Getting this error when scheduled report executes:
Unexpected error getting the HTTP response stream while generating report: http://cdmdb1c.nam.nsroot.net:4889/em/console/reports/renderHi..
Thanks for the comment.
Below is how my web.xml entry looks like.
The requirement is to send a 404 error response and that will be handled by a servlet which inturn writes the output to the response object.
<servlet>
<servlet-name>ErrorPageServlet</servlet-name>
<servlet-class>com.test.ErrorPageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ErrorPageServlet</servlet-name>
<url-pattern>/error</url-pattern>
</servlet-mapping>
<error-page>
<error-code>404</error-code>
<location>/error</location>
</error-page>>>
the first option to turn off the "show friendly html error pages" works fine.
It would be better if I can get a different solution -
The following error occurs.
Welcome to the Exchange Management Shell!
Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help *<string>*
Get general help: Help
Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
Show quick reference guide: QuickRef
Exchange team blog: Get-ExBlog
Show full output for a command: <command> | Format-List
Tip of the day #0:
Did you know that the Identity parameter is a "positional parameter"? That means you can use:
Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
It's a neat usability shortcut!
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
+ $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.: mail1.dorothy.local
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Randy CheekGood Morning,
Log into the server with an account that has appropriate Exchange rights, not a local account.
Note: By default - Domain Admins don't have Exchange rights.
Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
My Technical Blog: http://thelifestrategist.wordpress.com
Discipline is the Difference between Goals and Accomplishments
If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer" -
Let me know if it possible to add P3P header in the HTTP responses of Oracl
Let me know if it possible to add P3P header in the HTTP responses of Oracle applications 11.5.10
Could you please elaborate more on what you are trying to do/achieve?
Thanks,
Hussein -
How to calculate the byte tranfer to the http server
Hi,
I'm developing a multiplayer game on mobile phone.
At the end of the connexion, I need to know how many bytes were sent and received from the http server.
Here is the part code for the connexion to the server :
HttpConnection connection = (HttpConnection)Connector.open(request);
connection.setRequestMethod(HttpConnection.GET);
InputStream is = connection.openInputStream();
long length = connection.getLength();
byte[] datach = new byte[1];
int ch = 0;
while(is.read(datach) != -1)
ch = datach[0];
b.append((char)ch);
String s = b.toString();The size of each data I have to send or receive is less than 50 bytes.
All I do for now is adding the request size and the server response size.
For each request, I have to count the header size and the data size. But I don't know how to find the header size of my request.
And for each response from the server, I count the header size and the data size with connection.getLength().
I don't know whether it's the right method.
Does anyone know a better method to calculate exactly the bytes sent and received?TCP/IP "overhead" is basically 20%.
-
How to get the HTTP response body if the body is a malformed XML document
Hi,
I am using HTTP service with resultFormat = "e4x" set. What i
get in response is a malformed XML document in
some cases. Usually HTTPService throws a FaultEvent with the
fault detail set to faultCode:Client.CouldNotDecode
faultString:'Error #1091' or some other Error #1085 and so.
My client tries to log these errors on the server by using
another HTTP service again. But i would like to know
in the client code during run time what exact XML response
came in the first HTTP response.
How do i retrieve this information?
thanks,
Sunilservice capture or charles debug proxy can do the job.
flex builder 4 is rumored to include a traffic sniffer as
well, but that's next year. -
Reset the HTTP response code in OSB for proxy service
Hi,
I created a HTTP proxy service in ALSB with any XML message option. There are some business scnearios for which i need to send a custom error message in the HTTP body. I am replacing the $body variable with the error message and sending reply with success.As i am using reply with success it sends a HTTP response status code as 200 Ok.
However based on different error conditions i want to send appropraite http response code. How can this be achieved?I would like to share the solution so that it would be useful to all the users of the forum.
There is a http:http-response-code element in the $inbound variable which is optional element. You need to insert this element to the $inbound using the insert action. Here is the extract of the code:
Insert [<http:http-response-code>401</http:http-response-code>] [ as last child of ] [./con:transport/con:response] in [inbound]
Please note namespace con belongs to "http://www.bea.com/wli/sb/context".
Edited by: [email protected] on Aug 12, 2009 10:47 PM -
IDOC - XI - HTTP/MAIL (How to get the http response and send an email?)
Hi David!
If you are able to send any Http message in reference to message from XI (eg. with Idoc number or msg-id) there is no problem to process it in your scenario (even if comunication is asynchronous).
Regards,
RadekYou need a 2:1 mapping. source interfaces are Idoc and Http response, target interface is the mail.
As you can do his only for abstract interfaces, you have to create an abstract message interface based on the IDoc structure.
For the http call you need abstract async message interfaces representing request and response which you can use for the mapping and for the container variables inside the BPM.
Regards
Stefan -
Hi,
From the specification, SMB2 Query Info is defined as -Query_Info {
uint16_t structure_size;
uint8_t info_type;
uint8_t file_info_class;
uint32_t output_buf_len;
uint16_t input_buffer_off;
uint16_t res;
uint32_t input_buf_len;
uint32_t additional_information;
uint32_t flags;
uint8_t file_id[16];
I am looking at smb traffic between 2 Windows 7 Pro machines and I see that for SMB Query_Info Request records, for some compounded requests, the last Query_Info request has an extra byte after the 16 byte file_id. This is only for SMB2 Query_Info
requests.
On checking Query_Info requests that are single(not compounded), I don't see this extra byte.
I have attached images below from wireshark for both with and without this extra byte, from the same flow.
Can we consider this a quirk of the windows client issuing Query_Info Compounded requests?
Image1 - http://postimg.org/image/th8fubvuz <- As you can see, this is a comounded series of requests and the last requset which is a query_info request *HAS* an extra byte after the file_id.
Image2 - http://postimg.org/image/kkp4adxe7/ <- As you can, this is a compounded series of requests and the last request which is a query_info request, DOES *NOT* HAVE an extra byte after the file_id unlike Image1
Image3- http://postimg.org/image/5w7061vrr/ <- As you can see, this is a single Query_Info request, and we don't have the extra byte here after the file_id.We worked with cressnet and resolved these questions offline. Here is a summary of resolution.
Regarding the comments on compounded messages with QueryInfo,
this is not specific to QueryInfo.
The receiver’s transport layer delivers the message to the SMB2 layer (server/redirector). The SMB2 PDU starts with its header. The PDU is casted and interpreted based on the SMB2 command. What matters is the message’s structure
itself.
The transport’s (e.g. Nbtss or SMBoverTCP) indicates the length of its payload. Each SMB2 message has a structure which may include some variable length fields. Padding is one element that may complement the message for alignment
purpose. Any extra byte (s) that is not part of the SMB2 message fields would be irrelevant and ignored.
Regarding the comments on ErrorData,
the CHANGE_NOTIFY response packets look valid as documented in the [MS-SMB2] specification. In this particular case, even if the error is not a success code (i.e. STATUS_NOTIFY_ENUM_DIR), the response is an empty CHANGE_NOTIFY
Response, rather than a standard ERROR Response.
The exception cases that are not considered error messages are listed in [MS-SMB2] section 3.3.4.4. When in doubt, please consult the server processing of the specific SMB2 command.
[MS-SMB2] 3.3.4.4 Sending an Error Response
https://msdn.microsoft.com/en-us/library/cc246722.aspx
When the server is responding with a failure to any command sent by the client, the response message MUST be constructed as described here. An error code other than one of the following indicates a failure:
• STATUS_MORE_PROCESSING_REQUIRED in an SMB2 SESSION_SETUP Response specified in section 2.2.6.
• STATUS_BUFFER_OVERFLOW in an SMB2 QUERY_INFO Response specified in section 2.2.38.
• STATUS_BUFFER_OVERFLOW in a FSCTL_PIPE_TRANSCEIVE, FSCTL_PIPE_PEEK or FSCTL_DFS_GET_REFERRALS Response specified in section 2.2.32.<190>
• STATUS_BUFFER_OVERFLOW in an SMB2 READ Response on a named pipe specified in section 2.2.20.
• STATUS_INVALID_PARAMETER in an FSCTL_SRV_COPYCHUNK or FSCTL_SRV_COPYCHUNK_WRITE response, when returning an SRV_COPYCHUNK_RESPONSE as described in section 3.3.5.15.6.2.
• STATUS_NOTIFY_ENUM_DIR in an SMB2 CHANGE_NOTIFY Response specified in section 2.2.36.
[MS-SMB2] 3.3.5.19 Receiving an SMB2 CHANGE_NOTIFY Request
https://msdn.microsoft.com/en-us/library/cc246747.aspx
Change notification processing in the object store MUST be handled as specified in section 3.3.1.3. It is also outlined in [MS-CIFS] section 3.3.5.59.4.
If the server is unable to copy the results into the buffer of the SMB2 CHANGE_NOTIFY Response, then the server MUST construct the response as described below, with an OutputBufferLength of zero, and set the Status in the SMB2
header to STATUS_NOTIFY_ENUM_DIR.
Thanks,
Edgar -
What are frist 9 bytes of HTTP Response
on the server side i m doing some operation and then write a few bytes to the http response output stream if the operation is successful and if operation is unsuccessful i do not write anything. on the client side when i do an HTTP post request to this server side component, in the response i get 9 bytes + data (if the operation on server side was successful ) or just 9 bytes(if the operation was unsucessful). What are these 9 bytes. What does response body contains by default ?
One of the things that the response header always contains is a 3 digit code indicating the outcome. For example 200 is no errors/html should follow, 404 is file not found, 302 is redirection (I think), etc... I think if you get a 200 code, there should be a content length which indicates the size of the html which will follow. I'm not sure what else would always be in the header. What are the 9 bytes you are seeing?
-
How to see http response from an axis web service call (Eclipse)
Hello,
I would like to see the raw http response which is returned from web service calls. I have a dynamic web project in Eclipse which uses a local instance of Tomcat 6. I'm using all of the default setting for a top-down web service generated from a WSDL file. I've generated the client using the built-in "generate client" using default settings.
I've tried using the Eclipse plugin TCP/IP monitor and apache's TCPMON, but I am only able to see the http request, not the http response returned from the web server I am querying.
I've seen some sparse documentation outlining how to use logging handlers and a client-config.wsdd file, but I haven't been able to get that working.
So to recap, I'm looking for a way to view raw http responses using a web service client and server generated from a WSDL file in eclipse. I don't mind creating a new project using different code-generating libraries if someone has an easy way to do this using a different configuration.
Thanks very much,
Craig908794 wrote:
Hello,
I would like to see the raw http response which is returned from web service calls.Why the HTTP response? Isn't the soap message body enough? If it is, you probably want to check out SoapUI.
A simple google query for "apache axis2 http response" also return this article:
http://blogs.cocoondev.org/dims/archives/004668.html
And finally, you did go through the Axis2 website right? It has a wiki with a rather staggering amount of articles in there.
http://wiki.apache.org/ws/FrontPage/Axis2/ -
Hello,
I try to write a portal component, that provides an XML document. The component must be reachable via a URL. It generates an XML document from portal content. The generated XML document must be available using the URL.
I tried to solve this by implementing an AbstractPortalComponent iView. Inside the doContent method I write the XML document into the IPortalComponentResponse. The problem is, that the response does not only include the XML document, but the XML data is included inside an HTML document. I already set the EPCFLevel in component-profile to 0. So there is very few JavaScript left inside the HTML document. But I don't want any HTML at all. I want only the pure XML document inside the HTTP response.
Does anybody know a way to make a plain XML document available at an URL?
Thanks, best regards, OliverTry something like this in the docontent method
HttpServletResponse resp = request.getServletResponse(true);
resp.setContentType("text/xml");
resp.getOutputStream().write(bytes); -
Can we capture HTTP response for async message without BPM?
We are in the process of migrating an XI 2.0 scenario to XI 3.0.
The scenario is as follows in XI 2.0 - SAP sends an IDoc to XI which is mapped to an HTTP request and sent to an endpoint. The HTTP response is captured and shown in SXMB_MONI.
When we migrate this scenario to XI 3.0, we do not see the HTTP response in MONI. It looks like since the incoming message (IDoc) is triggering an asynchronous message flow, the HTTP receiver is ignoring the HTTP response payload if it sees a 200 OK status code. Ideally, we would like for the HTTP response to be captured in MONI just as in XI 2.0.
Is there a way to capture the HTTP response without using a BPM to make the HTTP synchronous call? It appears that there is nothing in the HTTP receiver communication channel that we can change (to change it from asynchronous to synchronous).
Thanks for your help,
Jay Malla
SAP XI Consultant
Licensed To CodeIt looks like the problem I am having might be due to a bug in SP15. It looks like i should see the HTTP response in MONI by default. Some other people had this problem with SP 15. Here is the posting:
Re: SXMB_MONI does not show payload after upgrade to SP15
Regards,
Jay
Maybe you are looking for
-
I am unable to save a completed form. It will only allow me to save the empty form. There are no security restrictions on performing this function. Any help?
-
Running Lion; can snow leopard be set up with bootcamp?
I have several programs that won't run in Lion on my MacBook Pro. Will bootcamp allow me to partition part of disc to run snow leopard which will run my programs? Thanks rjchemdoc
-
Slipstream SharePoint 2010 and Project Server Installation
Hello, I have my current farm environment with the below configuration SharePoint 2010 + Project Server which are on SP 2 + Brazil Language Pack 2 WFE 2 App 1 SQL We are planning to add more WFE and App server in the existing farm. As per my resear
-
Hi all, In my budget spreadsheet I am designing, I want to be able to denote the type of food each line item is in my "food" category. For example, I want to use a pop-up menu to indicate that the McDonald's I spent $5.66 on two days ago is a "Fast F
-
ATTENTION Oracle Support! Fix the download problem please!
There've been several complaints about problems with downloading Oracle 8i and 9i from this site. I can't download it either (Windows XP with IE6). OTN please respond on the issue.