No report for CentOS 6 & Foreman

I installed foreman on CentOS 6.4, puppet version is 3.1.1, foreman version
is 1.1.

when I run puppet agent , I can't see report on foreman. the logs are:

puppet_access.log:

127.0.0.1 - - [07/May/2013:10:26:11 +0800] "GET
/production/node/agent1.example.com? HTTP/1.1" 200 3680
127.0.0.1 - - [07/May/2013:10:26:11 +0800] "GET
/production/file_metadatas/plugins?links=manage&recurse=true&&ignore=—+%0A+±+%22.svn%22%0A+±+CVS%0A+±+%22.git%22&checksum_type=md5
HTTP/1.1" 200 283
127.0.0.1 - - [07/May/2013:10:26:12 +0800] "POST
/production/catalog/agent1.example.com HTTP/1.1" 200 1228
127.0.0.1 - - [07/May/2013:10:26:12 +0800] "PUT
/production/report/agent1.example.com HTTP/1.1" 200 24

ssl_access_log:

127.0.0.1 - - [07/May/2013:10:26:12 +0800] "POST /reports/create?format=yml
HTTP/1.1" 301 346

ssl_request_log:

[07/May/2013:10:26:12 +0800] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "POST
/reports/create?format=yml HTTP/1.1" 346

I visit the /reports/create?format=yml with curl ( curl -k
https://agent1.example.com/reports/create?format=yml ), the result is :
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a
href="https://agent1.example.com/reports/create/?format=yml">here</a>.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at agent1.example.com Port
443</address>
</body></html>

I visit the /reports/create/?format=yml with curl ( curl -k
https://agent1.example.com/reports/create/?format=yml ), the result is :
[root@agent1 logs]# curl -k
https://agent1.example.com/reports/create/?format=yml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /reports/create</title>
</head>
<body>
<h1>Index of /reports/create</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th><a
href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last
modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a
href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[DIR]"></td><td><a
href="/reports/">Parent Directory</a></td><td>&nbsp;</td><td
align="right"> - </td><td>&nbsp;</td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache/2.2.15 (CentOS) Server at agent1.example.com Port
443</address>
</body></html>

when I changed the line in file
/usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb :
req = Net::HTTP::Post.new("#{uri.path}/reports/create?format=yml")
to
req = Net::HTTP::Post.new("#{uri.path}/reports/create/?format=yml")

then run puppet agent , I can't see report on foreman. the logs are:

puppet_access.log:
127.0.0.1 - - [07/May/2013:10:31:00 +0800] "GET
/production/node/agent1.example.com? HTTP/1.1" 200 3680
127.0.0.1 - - [07/May/2013:10:31:00 +0800] "GET
/production/file_metadatas/plugins?links=manage&recurse=true&&ignore=—+%0A+±+%22.svn%22%0A+±+CVS%0A+±+%22.git%22&checksum_type=md5
HTTP/1.1" 200 283
127.0.0.1 - - [07/May/2013:10:31:01 +0800] "POST
/production/catalog/agent1.example.com HTTP/1.1" 200 1228
127.0.0.1 - - [07/May/2013:10:31:01 +0800] "PUT
/production/report/agent1.example.com HTTP/1.1" 200 24

ssl_access_log:
127.0.0.1 - - [07/May/2013:10:31:01 +0800] "POST
/reports/create/?format=yml HTTP/1.1" 404 298

ssl_error_log:
[Tue May 07 10:31:01 2013] [error] [client 127.0.0.1] Attempt to serve
directory: /var/www/html/reports/create/

ssl_request_log:
[07/May/2013:10:31:01 +0800] 127.0.0.1 TLSv1 DHE-RSA-AES256-SHA "POST
/reports/create/?format=yml HTTP/1.1" 298

Any suggestions ?