Launching html response in browser (or playing flash) - paw-app

I have a POST request that returns an HTML page with embedded flash
Trying to run it from Paw directly (i.e. choosing 'Web') shows 'Blocked Plug-in'. Is there a way to either unblock this or to open the response in a web browser?
Thanks!

You should be able to right-click on the URL in the response view and hit "Open Link in Web Browser"

Related

HTTP Response Structure

When I request a web page, assuming that this web page contains images, css and js files, how does http response look like? is it one response with multiple entities (img, css, js, text/html ....) or multiple response packets will be sent back to my browser each with a single entity?
get the Google Chrome. Then go to View -> Developer -> Developer Tools.
With the developer tools open, go to the tab "Network".
Now, with tha developer panel open. Go to the address bar of the browser and type something like http://csb.stanford.edu/class/public/pages/sykes_webdesign/05_simple.html
Then you can see all the files that the browser is requesting via HTTP.
As you can see, the HTTP response does not come with everything you see on the website. But the main page has references to images and CSS, then the browser parses this content and get the other items. A new HTTP request is make for each item [an image or a CSS file] of the webpage. Explore the tool and you will figure out how it works. Of couse... learn more about HTML.
If you request www.example.com, the response will be the default HTML document, probably index.html. This file will contain links to resources, like CSS files, Javascript files, images... etc... then the browser will proceed to download all those resources.
http://mkcohen.com/how-the-web-works-in-one-easy-lesson

Parsing headers in Safari - something similar to Live HTTP Headers for Firefox?

I need to resolve a weird issue with Safari playing back mp3 files as streaming files although the entire length of the content and all of the content is provided to the browser...
Apparently, I will have to address Range headers, which is a new topic for me.
How would I monitor the headers being sent and received in Safari? Is there a plugin or some other trick I can use? I have developer mode turned on so I can inspect elements, but I don't know how to monitor headers.
M
This should work:
Inspect Elements > Resources pane
At this point, you may see a window that says, "You need to enable resource tracking to use this panel" and offers you a choice of "Only enable for this session" or "Always enable." Either is fine, and then click "Enable resource tracking."
In the resulting window, find the resource you want the header for and select it.
On the right hand side, there should now be a header with two tabs: "Headers" and "Content." If it's not already selected, choose "Headers."
You should then see the headers (as Safari received them) for your selected resource. To look at another resource's header, just select that, and so on.
Starting with Safari 5.1, you can view HTTP headers in the Network tab of the Web Inspector:
Enable the Develop menu in Preferences -> Advanced, if it isn't already.
From your web page, choose Show Web Inspector from the Develop menu.
Switch to the Network tab.
Reload the page.
You can then select on the resource on the left and click "Headers."
In older Safari versions, this information was in the Web Inspector's Resources tab.

Forcing the browser to pop a save as dialog box from a link pointing to remote url

I am building a web app that lets the user directly download files on a cdn by clicking a link. The link should point to the cdn url directly in order to minimize the load on our servers.
We would like the to have the browser pop up the save as dialog box when the user clicks the link to download the file and not have the browser display the content of the file at all. So the page should not reload. However, we don't have access to setting the HTTP headers sent back from cdn. Is it possible to still pop up the save as dialog box for download using client-side code?
Is it possible to still pop up the save as dialog box for download using client-side code?
No. Unless the file type is something the browser does not understand (or the HTTP header Content-Disposition is "attachment"), the "Save As" dialog will not appear.
This behavior cannot be changed by JavaScript.
The behavior is controlled by the Content-Disposition header, unless the browser simply doesn't understand how to display content of the type returned. Without the ability to change the Content-Disposition header to attachment, you can't force the browser to download the file instead of render it. This must be done server-side.

IE7/8 ignoring file download request in popup

I'm using Silverlight and I need to allow the user to save some dynamically genereated files.
For PDF files I created an http handler and it works just fine when I open it in a popup window.
For Excel files I tried every combination of Content-type and Content-disposition but IE8 refuses to open the file. With Fiddler I can see the get and there's a very short display of an IE window but it closes straight away.
I can't see any error message anywhere and I can't find any other description of the issue. IE7 exhibits the same behaviour.
I tried Content-type = application/vnd.ms-excel, application/unknown, application/octet-stream
and for for Content-disposition I tried inline and attachment.
PS: I can't use the SL built-in save dialog because it requires the context to be within a user action and I generate the file asychronously on the server.
Sounds like automatic prompting for downloads is disabled. See this description on how to enable automatic prompting. Enabling automatic prompting worked for me (situation: silverlight app uses Window.Navigate to open a popup to a generic handler that generates an excel file, with content-disposition: attachment, which worked fine in FF, but not in IE8).
As this post is already pretty old, I'm curious if you found a better way to solve this!
You should be using Content-Disposition: attachment
Have you tried on another client? My guess is maybe that Office is trying to get kicked off and is failing.
Alternatively, it's possibly related to http://blogs.msdn.com/ieinternals/archive/2009/10/02/Internet-Explorer-cannot-download-over-HTTPS-when-no-cache.aspx

Display loading message and then prompt for open / save

I'm trying to get a page to show a "loading..." message while I create a report and then I'd like to trigger an open / save on the report I've just created.
I can create a static loading page but I don't know how to trigger the open / save dialog.
I could insert an <iframe> but then I would have to save the created report on the server side.
What I'm looking for is a way to just embed the created report into the HTML and let the browser deal with (the report files are Excel and PDF).
Is there a way to do that? I looked at <embed> but it requires a URL, same as <iframe>.
Maybe my best bet is to handle everything in an Http handler and make a first call to generate the report and then do a redirect to display it (and trigger the open / save).
Any ideas?
Are you allowed to use javascript?
You could have javascript on the loading page that either pops up a new window with the report generation or triggers a redirect to the report generation. In the report generation handler you can then set the content-disposition header to force the open/save box.
In the end, I didn't bother with the waiting message. I just point my Silverlight client at the HTTP handler address and wait for it to create it. I had issues with the <embed> tag and the Acrobat Reader plugin (the plugin would time out and not load the report when it was ready) but that doesn't happen at all when the browser waits for the page to load.
So, not an answer but it works.

Resources