# Rails and GWT (HTTP request setHeader problems)

**URL:** <https://www.ruby-forum.com/t/rails-and-gwt-http-request-setheader-problems/117355>\
**Category:** Rails\
**Created:** [October 16, 2007, 8:20am UTC](https://www.ruby-forum.com/t/rails-and-gwt-http-request-setheader-problems/117355 "2007-10-16T08:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fldrog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/49beb7/32.png) [@fldrog](https://www.ruby-forum.com/u/fldrog)\
**Post date:** [October 16, 2007, 8:20am UTC](https://www.ruby-forum.com/t/rails-and-gwt-http-request-setheader-problems/117355/1 "2007-10-16T08:20:02Z")

</div>

Hello  
I have a server in rails and the client side in GWT…I have problem  
with setting the header of a request in GWT i do something like this:

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,  
“[http://localhost:3000/securities/“+security.getId()+”/market\_overview](http://localhost:3000/securities/%22+security.getId()+%22/market_overview)”);  
builder.setHeader(“HTTP\_IF\_MODIFIED\_SINCE”, “Mon Oct 15 15:38:35  
+0300 2007”);

and on RUBY SERVER i do:

minTime = Time.rfc2822(request.env[‘HTTP\_IF\_MODIFIED\_SINCE’]) rescue nil  
if (minTime and @market\_overview.updated\_at\<= minTime)  
render\_text ‘’, ‘304 Not Modified’  
else  
respond\_to do |format|  
#inti securityURL for this MO  
format.xml { render :xml =\> (@market\_overview.to\_xml  
:skip\_types =\> true)}  
end  
end

request.env[‘HTTP\_IF\_MODIFIED\_SINCE’] is nil…I don’t know where I do  
wrong …on the client side or on the server side…Please help me if  
you can…Thanks!
