Piotr Sarnacki
1340fdb316
Allow to pass additional responders to respond_with
2013-05-08 14:11:02 +02:00
Piotr Sarnacki
887c835bd4
Use client_domain instead of domain for url in CC.xml
2013-03-25 16:53:20 +01:00
Piotr Sarnacki
15dd13ba02
Merge branch 'pr/46'
2013-03-25 16:40:08 +01:00
Piotr Sarnacki
f3ceee9b28
Always set content_type in responder
2013-03-25 16:39:37 +01:00
Andre Arko
2935050395
https is better
2013-03-25 16:16:42 +01:00
Andre Arko
c57e9cbcc6
valid URLs in cc.xml Project webUrl
2013-03-25 16:09:37 +01:00
Piotr Sarnacki
61142c7cf6
Return 404 unless we can find API builder for resource
...
In order to protect us from rendering a resource simply converted to
json, without processing it with API data class, this commit changes
JSON responder behavior to render 404 if we can't find associated data
class. The only exception to that rule is when resource is already a
Hash, meaning that it was processed before - we sometimes return for
example simple Hash responses like { result: true }.
The Hash exception could allow to accidentally pass resource.as_json to
responder, but in travis-ci/travis-support@124b8b6 I disabled default
as_json method on AR::Base classes, so the risk of such mistake is
lowered.
2013-03-24 19:49:28 +01:00
Piotr Sarnacki
705927ff74
Don't error out if xml is requested with something else than repo
2013-03-12 12:08:43 +01:00
Piotr Sarnacki
54a6926aaf
Properly handle non existent resources
...
This commit changes travis-api to always return 404 response if resource
is not available. Previously we were returning image/png with "unknown"
status instead if user used "*/*" Accept header, which was confusing.
2013-03-11 23:52:57 +01:00
Piotr Sarnacki
b6f3ef10aa
Resource can be nil in Responders::Image
2013-03-11 20:57:45 +01:00
Piotr Sarnacki
04bb751b02
When serving image, return proper Last-Modified header
2013-03-11 20:54:24 +01:00
Piotr Sarnacki
5345ef818e
Use version from each of the accept headers, not only first one
2013-02-25 17:28:24 +01:00
Piotr Sarnacki
36783e6359
Handle chunked=true param in Accept header
2013-02-25 17:28:24 +01:00
Piotr Sarnacki
212eb6d9d3
Allow passing more than one mime type in Accept
2013-02-25 17:27:56 +01:00
Sven Fuchs
7e005aad1b
use travis-core/sf-log-models
2013-02-10 21:30:50 +01:00
Konstantin Haase
593920ce81
add Pragma header for caches that do not understand Cache-Control, see #38
2013-01-21 21:18:16 +01:00
Piotr Sarnacki
e6899b3ce6
Allow to remove ansi chars from plain text log
2013-01-15 02:27:06 +01:00
Piotr Sarnacki
70cd6ef092
Allow to download logs in plain text
2013-01-15 02:23:02 +01:00
Sven Fuchs
de16fb07f8
test result images based on the content-disposition header, fix content-disposition header
2012-12-12 15:19:27 +01:00
Sven Fuchs
a9bf43c1fd
always use etag for caching when cache_key or updated_at are present, add the deploy_sha as a cache buster
2012-12-09 19:22:33 +01:00
Sven Fuchs
d113833e9a
fix xml responder and result image specs
2012-12-09 16:02:00 +01:00
Sven Fuchs
6d12070fba
use Repository::StatusImage
2012-12-09 15:16:50 +01:00
Piotr Sarnacki
505b2fb911
No need to revalidate if resource is final
2012-11-01 16:15:06 +01:00
Piotr Sarnacki
eac77c8a3b
Fix cache_control
2012-10-24 20:49:06 +02:00
Konstantin Haase
a3db22fa69
force no-cache
2012-10-24 00:24:26 +02:00
Konstantin Haase
778acbf275
improve caching logic
2012-10-23 22:00:06 +02:00
Konstantin Haase
ca47b31904
don't cache non-final services
2012-10-23 21:49:34 +02:00
Konstantin Haase
6252deadee
improve caching headers
2012-10-17 18:51:11 +02:00
Sven Fuchs
270c2fb82d
re-add flash messages
2012-10-14 15:11:05 +02:00
Sven Fuchs
e6b44ff1eb
add http headers for services that respond to caching info
2012-10-11 05:04:27 +02:00
Piotr Sarnacki
4f33a93769
Fix PUT /users/:id and add integration test for it
2012-10-11 01:00:53 +02:00
Sven Fuchs
8abd6fa150
manual redirects and rewrite rules for supporting v1 style resources
2012-10-10 01:48:22 +02:00
Sven Fuchs
f8bd49e88b
on 404 redirect for /owner/name paths on v1
2012-10-10 01:47:12 +02:00
Sven Fuchs
a7d72beefc
move responders out of helpers
2012-10-09 20:51:09 +02:00