Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
Plugin version 1.0 in Dev@Cloud - netflixoss.ci.cloudbees.com
Description
For our Netflix OSS projects, build status icons don't update in our GitHub pages unless we clear the browser cache. An example is at https://github.com/Netflix/RxJava
I investigated with Michael Neale and we found that the HTTP response includes "Cache-Control:public", which is likely causing the problem. Michael verified that this problem doesn't happen with build status icons from BuildHive, because the HTTP rsponses from BuildHive don't include the Cache-Control setting.
I looked at the plugin code to see if this was an easy fix, but it looks like the HTTP response is generated somewhere in the Stapler code, which I didn't want to mess with
Attachments
Issue Links
- is duplicated by
-
JENKINS-22875 Image does not appear on "Embeddable Build Status" page or in Github
-
- Closed
-
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/org/jenkinsci/plugins/badge/BadgeAction.java
src/main/java/org/jenkinsci/plugins/badge/BadgeActionFactory.java
src/main/java/org/jenkinsci/plugins/badge/StatusImage.java
http://jenkins-ci.org/commit/embeddable-build-status-plugin/1bac74e1e2e2780504a04779175456cc8a8bda6c
Log:
[FIXED JENKINS-17028]
Some browsers appear to cache 302 requests in violation of RFC
(I'm looking at you, Chrome: http://code.google.com/p/chromium/issues/detail?id=103458)
I also saw this behavior with Firefox, even though I couldn't locate any
bug report.
Sine Chrome alone is a big enough browser share, in this change I
modified the code to avoid 302 redirects and instead to service the
request with 200.
To avoid excessive data transfer, ETag is used to detect that the
browser has the image in cache.
Compare: https://github.com/jenkinsci/embeddable-build-status-plugin/compare/233087cbd8dc...1bac74e1e2e2
–
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.