Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

RSS responses are saved as binary data rather than text #53

Closed
cressie176 opened this Issue · 2 comments

2 participants

@cressie176

I tried using betamax to cache the RSS response from a Jenkins build. Everything worked OK apart from the tape stored the response as binary rather than text, meaning I couldn't edit it to customise the RSS response.

!tape
name: Jenkins RSS
interactions:

  • recorded: 2012-05-01T10:15:18.983Z request: method: GET uri: http://build.acuminous.meh:8080/job/Jinkies/rssAll headers: Accept: text/html, image/gif, image/jpeg, ; q=.2, */; q=.2 Host: build.acuminous.meh:8080 Proxy-Connection: keep-alive User-Agent: Java/1.6.0_29 response: status: 200 headers: Content-Type: application/atom+xml;charset=UTF-8 Date: Tue, 01 May 2012 10:09:06 GMT body: !!binary |- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVV...
@robfletcher
Owner

The MemoryTape class assumes that any content that is not text/*, application/json or application/javascript should be stored as binary. This should probably be extended for other MIME types and made customisable.

@robfletcher
Owner

I think for now I'm going to add application/(\w+\+)?xml to the text mime type patterns. If there are a lot of requests for other formats I'll make it customizable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.