Parent Directory
|
Revision Log
Revision 305 - (view) (download) (as text)
| 1 : | malsyned | 305 | package WeBWorK::ContentGenerator |
| 2 : | |||
| 3 : | # new(Apache::Request, WeBWorK::CourseEnvironment) | ||
| 4 : | sub new($$$) { | ||
| 5 : | my $class = shift; | ||
| 6 : | my $self = {}; | ||
| 7 : | ($self->{r}, $self->{courseEnvironment}) = @_; | ||
| 8 : | bless $self, $class; | ||
| 9 : | return $self; | ||
| 10 : | } | ||
| 11 : | |||
| 12 : | # standard_header(Apache::Request, Content-type, header => "value" ...) | ||
| 13 : | #sub headers($$%) { | ||
| 14 : | # ($r, $ct, %headers) = @_; | ||
| 15 : | # $r->content_type($ct); | ||
| 16 : | # foreach my $key (keys %headers) { | ||
| 17 : | # $r->header_out($key, $headers{$key} | ||
| 18 : | # } | ||
| 19 : | # $r->send_http_header; | ||
| 20 : | # | ||
| 21 : | # return 1 if $r->header_only; | ||
| 22 : | # return 0; | ||
| 23 : | #} | ||
| 24 : | |||
| 25 : | sub go($) { | ||
| 26 : | my $self = shift; | ||
| 27 : | ($r, $ct, %headers) = @_; | ||
| 28 : | $r->content_type($ct); | ||
| 29 : | foreach $key (keys %headers) { | ||
| 30 : | $r->header_out($key, $headers{$key} | ||
| 31 : | } | ||
| 32 : | $r->send_http_header; | ||
| 33 : | |||
| 34 : | return OK if $r->header_only; | ||
| 35 : | |||
| 36 : |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |