Charles Proxy - View request as .. Image not working - charles-proxy

I am using Charles Proxy to review my app which sends some requests as images, the request has Content-Type image/jpeg and if I save the request to my finder, image will be previewed correctly.
However this is pretty time consuming, I would like to see the preview directly on charles because I'm reviewing several dozens of images. The View Request As ... Image doesn't seem to change anything in the Overview/contents/summary etc tabs bellow.
Is there a way to preview images from Charles app?

Related

Create an issue with image via GitHub API

I am creating issues with https://developer.github.com/v3/issues/#create-an-issue. Is it possible to attach images to message body?
I tried 'Accept', 'application/vnd.github.v3.html+json'and emmbeded the image as img elment base64 encoded. The image will not show, but the ticket editor shows the img element.
There is no simple solution to this. The official docs say nothing about that which means it's not supported.
The GitHub.com authentication works based on cookies while the API authentication uses tokens/passwords. That means if you really want to hack the things to upload your image using GitHub, you have to login using a cookie which is probably more difficult than using a third-party image hosting website.
For example, you could just upload your image to imgur and then add it in the issue body:
![image-title](http://i.imgur.com/x....xx.png)
This will anyway be proxied by GitHub proxy and will be served offer HTTPs.

View the response body of a COMET event with Chrome Developer Tools

Is it currently possible to view the body of the message being sent by a COMET event using Chrome Developer tools? I'm simply looking at COMET Clock sample here by Play Framework - http://www.playframework.com/documentation/2.2.x/Samples. When I enable the developer tools and go to the event-stream object, I can only see the request and response headers. No body or message can be viewed anywhere. Is this currently even possible? Nothing shows up under WebSockets, but I'm fairly sure this example is not using WebSockets, so that makes sense.
No. It is not possible for HTTP streaming (which I think it is your case) as March 2014 (hopefully they change this in the future)
Google Devtools only shows the response when the connection is closed.
In the case of web-sockets you do see live data.
But! modern versions of Firebug can show live data streaming. So I recommend you get Firefox and install the Firebug addon.
((Ahh firebug, it used to be all we had. Poor forgotten guy. But it still has nice things Chrome lacks!))
Cheers.
You can inspect the response from any HTTP request using the DevTools Network tab. To make finding your Comet request easier, select the XHR filter button at the bottom of the Network tab panel. You may need to reload the page after opening the Network tab to refresh the list of requests. Sometime it is necessary to switch back and forth between the All and XHR filters to see new requests that have been initiated since selecting the XHR filter. Once you have identified the request item, click to select it. On the right panel choose
Response from the taps at the top

iPhone not caching Asp.Net pages

If I create a basic asp.net application and set the #outputcache the page is cached fine in chrome & IE on the desktop. First request returns 200, subsequent request return 304 for the default.aspx. (I'm monitoring through fiddler)
However accessing the same page from an iPhone I noticed that it's always returning 200 for the aspx file. All resources are being caching and are returning 304's. So it's just the aspx page.
Any ideas why this is happening?
Some technical details:
<%# OutputCache Duration="30" VaryByParam="None" Location="Any" %>
Stock standard ASPX page. Content-Length: 2464
Reloading on the iPhone using refresh control or keyboard "go" doesn't make a difference.
Explicitly setting eTag does not make a difference
Last-Modified is set
but If-Modified-Since is not being send for the ASPX page
Latest IOS 4.3.1
IIS 7.5 running on Win7 using ASP.NET 4
I think I figured it out. Feel free to correct me however. Website caching is a very messy area.
The root of the problem is that the iPhone is not sending "If-Modified-Since" headers with it's requests. Without that the server cannot reply with a 304.
After some experiments I've found that if you use a link to navigate to the page it will send the 'If-Modified-Since' header and everything works as expected and the server neatly returns a 304.
Cases where it does not send a "If-Modified-Since" even though it's cached:
Typing in the URL
Pressing the refresh button
Selecting the URL and pressing Go
Opening as a bookmark
Opening from a saved reference on the home screen
It only seems to be doing this for the primary url everything else that is referenced does have a "If-Modified-Since" header (where applicable).
Note: I've tested this on IOS 4.3.1 only. Looking at the link Paddo send and further investigation into that area it seems that Apple likes to change caching behaviour between IOS versions.
Found this, re php (will also apply to .net)... iphone doesn't seem to cache any resource over 15k in size, and total cache size is 1.5MB. Note this is old information so may have changed.
http://www.phpied.com/iphone-caching/
The solution for a file over 15k, is to use an offline application cache manifest file, as outlined here:
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html
PS I know your content length is below 15k - so something else must be amiss... but I'm still hopeful that the manifest file will work.
for ASP.NET just use
Response.AddHeader( "Cache-Control","no-cache");
or
Response.AddHeader( "Pragma", "no-cache");
or
Response.Cache.SetCacheability(HttpCacheability.NoCache);

iPhone - Send contents of webview as mail

I'm composing my messages using images, text and audio files and finally showing the preview in Webview. Now, I want to send what ever it is showing in web view as mail. Even images and audio files must be sent so that end user has just to see the message with all images and aduio files as in original message.
Is it possible?
Send the actual HTML of the web page. Be sure to set the in the page, so any links in the page will be referenced relative to the original URL. There are upsides and downsides to this method:
UPSIDE: Small file will be sent - just the HTML of the base page
DOWNSIDE: Any images and sounds will not be sent in the message - and will have to be downloaded by the users email client from the original URL when the page is viewed. (Any web client that supports HTML content type will be able to do this.)
Don't forget to set the content (MIME) type of the email message to TEXT/HTML.

Just can't seem to fetch the mobile Gmail html, what is wrong?

I'm trying to cache the mobile Gmail webpage because UIWebView does not cache the content itself (mobile safari does, but not UIWebView).
I tried the methods listed here Reading HTML content from a UIWebView basically saving the html either directly from URLRequest or from UIWebView itself. When I try to put the html saved back into UIWebView it is not the same page!
This is the page that I want to save
alt text http://img39.imageshack.us/img39/5679/screenshot20090830at123.png
This is the page that the html saved will display
alt text http://img39.imageshack.us/img39/8734/screenshot20090830at122.png
If you're loading using loadData:MIMEType:textEncodingName:baseURL: make sure you're setting baseURL correctly - that way, the WebView will know where to look for relative stylesheets and so on.
Edit: For example, if I was saving this page, I'd set the base URL to Just can't seem to fetch the mobile Gmail html, what is wrong?.
That looks like the same page to me, but with different stylesheets attached. If you're just re-displaying identical HTML from your local server, the relative stylesheet paths in Google's HTML would no longer be correct. Also, any AJAX requests meant to run after the page loads would no longer work (both because the relative paths to the scripts would be wrong, and also because Cross-Site Scripting restrictions would prevent them from contacting Google).
Attempting to scrape content from an AJAX-enabled application is no small undertaking. You'd have to replicate a lot of GMail's functionality to truly reproduce the exact page Google presents.