Skip to content

Instantly share code, notes, and snippets.

View ckoehler's full-sized avatar

Christoph Koehler ckoehler

View GitHub Profile
@ckoehler
ckoehler / rack_adapter.rb
Created May 30, 2011 22:21
Faye fix for Firefox Bad Request
def message_from_request(request)
if request.post?
content_type = request.env['CONTENT_TYPE'].split(';').first
content = request.body.read
# if we get json, just return the body
if content_type == 'application/json'
return content
else
# we don't have JSON but something else, but it's not always in
<NSManagedObjectContext: 0x5d32fe0>
create obj
did change notification
configure cell
<NSManagedObjectContext: 0x5d32fe0>
<NSManagedObjectContext: 0x5d32fe0>
<NSManagedObjectContext: 0x5d32fe0>
changed obj
changed obj, text view
changed timestamp
- (void)viewDidLoad {
[super viewDidLoad];
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(createRequest)];
self.navigationItem.rightBarButtonItem = saveButton;
[saveButton release];
self.request = [NSEntityDescription insertNewObjectForEntityForName:@"Request" inManagedObjectContext:self.context];
}
- (void)createRequest
{
ruby(36500,0x105eed000) malloc: *** error for object 0x1012b0e00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT, Aborted.
0x00007fff8073bdce in select$DARWIN_EXTSN ()
(gdb) bt
#0 0x00007fff8073bdce in select$DARWIN_EXTSN ()
#1 0x000000010060ad3e in _SelectDataSelect (v=0x7fff5fbfddc0) at em.cpp:725
#2 0x0000000100112aaf in rb_thread_blocking_region ()
#3 0x000000010060b219 in EventMachine_t::_RunSelectOnce (this=0x100784000) at em.cpp:737