summaryrefslogtreecommitdiff
path: root/report/report_application.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2010-07-19 10:02:06 +0200
committermguetlein <martin.guetlein@gmail.com>2010-07-19 10:02:06 +0200
commit31ffaec72cf29dacd2fe0e87c9685e5b1b19b4c3 (patch)
treede1a45fa7103ecfd335eee66cddd7f58a46c0c9a /report/report_application.rb
parente4c976612d98a8ded00defb12685abdbfda56650 (diff)
sending report in qmrf-xml independet of accept-header
Diffstat (limited to 'report/report_application.rb')
-rw-r--r--report/report_application.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/report/report_application.rb b/report/report_application.rb
index 2d65904..efa0298 100644
--- a/report/report_application.rb
+++ b/report/report_application.rb
@@ -60,9 +60,9 @@ get '/report/:type/:id' do
end
#request.env['HTTP_ACCEPT'] = "application/pdf"
- #QMRF-STUP
+ #QMRF-STUB
if params[:type] == Reports::ReportFactory::RT_QMRF
- raise Reports::BadRequest.new("only 'application/qmrf-xml' provided so far") if accept_header != "application/qmrf-xml"
+ #raise Reports::BadRequest.new("only 'application/qmrf-xml' provided so far") if accept_header != "application/qmrf-xml"
content_type "application/qmrf-xml"
result = body(OpenTox::RestClientWrapper.get("http://ecb.jrc.ec.europa.eu/qsar/qsar-tools/qrf/QMRF_v1.2_FishTox.xml"))
else
@@ -110,11 +110,11 @@ end
post '/report/:type/:id' do
perform do |rs|
- #QMRF-STUP
+ #QMRF-STUB
if params[:type] == Reports::ReportFactory::RT_QMRF
- raise Reports::BadRequest.new("only 'application/qmrf-xml' provided so far") if request.content_type != "application/qmrf-xml"
+ #raise Reports::BadRequest.new("only 'application/qmrf-xml' provided so far") if request.content_type != "application/qmrf-xml"
input = request.env["rack.input"].read
- "save qmrf would have been successfull, received data with "+input.to_s.size.to_s+" characters, this is just a stup, changes discarded"
+ "save qmrf would have been successfull, received data with "+input.to_s.size.to_s+" characters, this is just a stub, changes discarded"
else
"operation not supported yet"
end